RegistryPolicy Constructor (DomainController, String, Boolean)
Initializes a new instance of the RegistryPolicy class by using the specified DomainController, the display name of the Group Policy object (GPO), and a value that specifies whether to open the GPO in read-only mode.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public RegistryPolicy(
DomainController domainController,
string gpoDisplayName,
bool readOnly
)
public:
RegistryPolicy(
DomainController^ domainController,
String^ gpoDisplayName,
bool readOnly
)
new :
domainController:DomainController *
gpoDisplayName:string *
readOnly:bool -> RegistryPolicy
Public Sub New (
domainController As DomainController,
gpoDisplayName As String,
readOnly As Boolean
)
Parameters
domainController
Type: System.DirectoryServices.ActiveDirectory.DomainControllerA DomainController object that represents the domain controller to use.
gpoDisplayName
Type: System.StringThe display name of the GPO to edit.
readOnly
Type: System.Booleantrue to open the GPO in read-only mode; otherwise, false.
Remarks
This constructor calls the GroupPolicyExtension constructor and OpenGpo methods. Exceptions thrown from those methods will be passed back to the caller of this constructor.
See Also
RegistryPolicy Overload
RegistryPolicy Class
Microsoft.GroupPolicy Namespace
Return to top