API Reference
Class
GpoGroupAssignmentChecker
Parses Group Policy Preference files for local group member additions and logs warnings when suspicious accounts are detected.
Inheritance
- Object
- GpoGroupAssignmentChecker
Constructors
public GpoGroupAssignmentChecker(IEnumerable<String> suspiciousAccounts = null) #Initializes a new instance of the GpoGroupAssignmentChecker class.
Parameters
- suspiciousAccounts System.Collections.Generic.IEnumerable{System.String} = null
- Accounts that should trigger warnings when added to local groups.
Methods
public Void CheckDirectory(String directoryPath) #Returns:
VoidScans a directory recursively for Group Policy Preference group XML files and logs warnings.
Parameters
- directoryPath System.String
- Path to the root directory containing GPOs.
public Void CheckFile(String filePath) #Returns:
VoidParses a Group Policy Preference XML file and logs warnings for suspicious account additions.
Parameters
- filePath System.String
- Path to the XML file.
public static IEnumerable<String> GetAddedMembersFromFile(String filePath) #Returns:
IEnumerable<String>Retrieves accounts added to local groups from a Group Policy Preference XML file.
Parameters
- filePath System.String
- Path to the XML file.
Returns
Collection of account names.
public static IEnumerable<String> GetAddedMembersFromXml(String xml) #Returns:
IEnumerable<String>Retrieves accounts added to local groups from a Group Policy Preference XML string.
Parameters
- xml System.String
- XML content.
Returns
Collection of account names.
Inherited Methods
Properties
public HashSet<String> SuspiciousAccounts { get; } #Gets the set of accounts considered suspicious.