TestimoX

API Reference

Class

LocalGpoLocator

Namespace ADPlayground.Gpo.GpoLocal
Assembly ADPlayground
Modifiers static

Locates Local Group Policy registry.pol paths on the local machine (machine, current user, per-user by SID).

Inheritance

  • Object
  • LocalGpoLocator

Methods

public static String GetAdministratorsCommentPath() #
Returns: String

Gets the path to the comment.cmtx for built-in Administrators (MLGPO).

public static String GetAdministratorsPolicyCommentPath() #
Returns: String

Gets the path to the policyComments.cmtx for built-in Administrators (MLGPO).

public static String GetAdministratorsPolPath() #
Returns: String

Gets the path to the per-user Registry.pol for the built-in Administrators (MLGPO).

public static String GetMachineCommentPath() #
Returns: String

Gets the path to the machine comment.cmtx file.

public static String GetMachinePolicyCommentPath() #
Returns: String

Gets the path to the machine policyComments.cmtx file.

public static String GetMachinePolPath() #
Returns: String

Gets the path to the machine Registry.pol file.

public static String GetNonAdministratorsCommentPath() #
Returns: String

Gets the path to the comment.cmtx for built-in Non-Administrators (MLGPO).

public static String GetNonAdministratorsPolicyCommentPath() #
Returns: String

Gets the path to the policyComments.cmtx for built-in Non-Administrators (MLGPO).

public static String GetNonAdministratorsPolPath() #
Returns: String

Gets the path to the per-user Registry.pol for the built-in Non-Administrators (MLGPO).

public static String GetPerUserCommentPath(String sid) #
Returns: String

Gets the path to a per-user comment.cmtx file for a given sid.

Parameters

sid System.String requiredposition: 0
Account SID (e.g., S-1-5-21-...-1001).
public static String GetPerUserPolicyCommentPath(String sid) #
Returns: String

Gets the path to a per-user policyComments.cmtx file for a given sid.

Parameters

sid System.String requiredposition: 0
Account SID (e.g., S-1-5-21-...-1001).
public static String GetPerUserPolPath(String sid) #
Returns: String

Gets the path to a per-user Registry.pol file for a given sid.

Parameters

sid System.String requiredposition: 0
Account SID (e.g., S-1-5-21-...-1001).
public static String GetUserCommentPath() #
Returns: String

Gets the path to the user comment.cmtx file.

public static String GetUserPolicyCommentPath() #
Returns: String

Gets the path to the user policyComments.cmtx file.

public static String GetUserPolPath() #
Returns: String

Gets the path to the user Registry.pol file.

public static String GetWindowsRoot() #
Returns: String

Gets the Windows root directory (e.g., C:\Windows) with fallbacks for older frameworks.

public static String TryGetSid(String account) #
Returns: String

Translates an account name (DOMAIN\User) to SID string, or null if not found.

Parameters

account System.String requiredposition: 0
Account name in NT format or local name.

Returns

SID string when resolved; otherwise null.