RegistryPreference Constructor (DomainController, String, Boolean, Boolean)
Initializes a new instance of the RegistryPreference class by using the specified DomainController, the display name of the Group Policy object (GPO), a value that specifies whether to edit Computer Configuration or User Configuration, 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 RegistryPreference(
DomainController domainController,
string gpoDisplayName,
bool computerConfiguration,
bool readOnly
)
public:
RegistryPreference(
DomainController^ domainController,
String^ gpoDisplayName,
bool computerConfiguration,
bool readOnly
)
new :
domainController:DomainController *
gpoDisplayName:string *
computerConfiguration:bool *
readOnly:bool -> RegistryPreference
Public Sub New (
domainController As DomainController,
gpoDisplayName As String,
computerConfiguration As Boolean,
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.
computerConfiguration
Type: System.Booleantrue to edit Computer Configuration; false to edit User Configuration.
readOnly
Type: System.Booleantrue to open the GPO in read-only mode; otherwise, false.
See Also
RegistryPreference Overload
RegistryPreference Class
Microsoft.GroupPolicy Namespace
Return to top