Skip to content

rkttu/AdmxPolicyManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdmxPolicyManager

NuGet Version Build Status GitHub Sponsors

Windows Policy Setting and Lookup Framework for use with the AdmxParser package

Breaking Changes

0.6.3 -> 0.6.4

  • All of ~Core methods has been hided. These methods are not intended to be used by the user.

0.6.2 -> 0.6.3

  • Set~~~Policies and Delete~~~Policies methods has been changed return type from collection to count integer. You can lookup the result in the request object.

v0.5.x -> v0.6

The code has been completely redeveloped to use AdmxParser's interpreted model, and it has been completely redeveloped to ensure stable operation, and is equipped with code that is completely different from the existing 0.5.x version.

Minimum Requirements

  • Requires a platform with .NET Standard 2.0 or later, and Windows Vista+, Windows Server 2008+
    • Supported .NET Version: .NET Core 2.0+, .NET 5+, .NET Framework 4.6.1+, Mono 5.4+, UWP 10.0.16299+, Unity 2018.1+

How to use

The code below is a simple depiction of how to use it. We'll add more full code examples as they become available.

var admxDirectory = AdmxDirectory.GetSystemPolicyDefinitions();
await admxDirectory.LoadAsync();

var inetres = admxDirectory.GetAdmxContentByPrefix("inetres");
var fontSizePolicy = inetres.GetUserPolicy("FontSize");
fontSizePolicy.SetUserPolicy(true);

var elemIdList = fontSizePolicy.GetElementIds();
var elemId = elemIdList.FirstOrDefault(x => string.Equals("FontSizeDefault", x, StringComparison.OrdinalIgnoreCase));
var value = 2;
var queryResult = fontSizePolicy.GetUserElement(elemId);
Console.Out.WriteLine(queryResult.Value);

License

This library follows Apache-2.0 license. See LICENSE file for more information.

About

Windows Policy Setting and Lookup Framework for use with the AdmxParser package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages