TestimoX

API Reference

Class

GpoGroupAssignmentChecker

Namespace ADPlayground.Gpo
Assembly ADPlayground

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 optionalposition: 0
Accounts that should trigger warnings when added to local groups.

Methods

public Void CheckDirectory(String directoryPath) #
Returns: Void

Scans a directory recursively for Group Policy Preference group XML files and logs warnings.

Parameters

directoryPath System.String requiredposition: 0
Path to the root directory containing GPOs.
public Void CheckFile(String filePath) #
Returns: Void

Parses a Group Policy Preference XML file and logs warnings for suspicious account additions.

Parameters

filePath System.String requiredposition: 0
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 requiredposition: 0
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 requiredposition: 0
XML content.

Returns

Collection of account names.

Properties

public HashSet<String> SuspiciousAccounts { get; } #

Gets the set of accounts considered suspicious.