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)
Usage
Dim domainController As DomainController
Dim gpoDisplayName As String
Dim computerConfiguration As Boolean
Dim readOnly As Boolean
Dim instance As New RegistryPreference(domainController, gpoDisplayName, computerConfiguration, readOnly)
Syntax
'Declaration
Public Sub New ( _
domainController As DomainController, _
gpoDisplayName As String, _
computerConfiguration As Boolean, _
readOnly As Boolean _
)
public RegistryPreference (
DomainController domainController,
string gpoDisplayName,
bool computerConfiguration,
bool readOnly
)
public:
RegistryPreference (
DomainController^ domainController,
String^ gpoDisplayName,
bool computerConfiguration,
bool readOnly
)
public RegistryPreference (
DomainController domainController,
String gpoDisplayName,
boolean computerConfiguration,
boolean readOnly
)
public function RegistryPreference (
domainController : DomainController,
gpoDisplayName : String,
computerConfiguration : boolean,
readOnly : boolean
)
Parameters
- domainController
A DomainController object that represents the domain controller to use.
- gpoDisplayName
The display name of the GPO to edit.
- computerConfiguration
true to edit Computer Configuration; false to edit User Configuration.
- readOnly
true to open the GPO in read-only mode; otherwise, false.
Platforms
Development Platforms
Windows Server 2008 R2
Target Platforms
Windows Server 2008 R2
See Also
Reference
RegistryPreference Class
RegistryPreference Members
Microsoft.GroupPolicy Namespace