PreferenceExtension Constructor (Domain, String, Boolean)
Initializes a new instance of the PreferenceExtension class by using the specified Domain, the display name of the Group Policy object (GPO), and a value that specifies whether to edit Computer Configuration or User Configuration.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in microsoft.grouppolicy.management.dll)
Usage
Dim domain As Domain
Dim gpoDisplayName As String
Dim isComputerConfiguration As Boolean
Dim instance As New PreferenceExtension(domain, gpoDisplayName, isComputerConfiguration)
Syntax
'Declaration
Protected Sub New ( _
domain As Domain, _
gpoDisplayName As String, _
isComputerConfiguration As Boolean _
)
protected PreferenceExtension (
Domain domain,
string gpoDisplayName,
bool isComputerConfiguration
)
protected:
PreferenceExtension (
Domain^ domain,
String^ gpoDisplayName,
bool isComputerConfiguration
)
protected PreferenceExtension (
Domain domain,
String gpoDisplayName,
boolean isComputerConfiguration
)
protected function PreferenceExtension (
domain : Domain,
gpoDisplayName : String,
isComputerConfiguration : boolean
)
Parameters
- domain
A Domain that represents the domain of the GPO.
- gpoDisplayName
The display name of the GPO to edit.
- isComputerConfiguration
true to edit Computer Configuration; false to edit User Configuration.
Exceptions
| Exception type | Condition |
|---|---|
| ArgumentNullException | The domain parameter or the gpoDisplayName parameter is null. |
| ActiveDirectoryObjectNotFoundException | The GPO is not found. |
| MultipleGroupPolicyObjectsFoundException | Multiple GPOs with the specified display name exist in the domain. |
Platforms
Development Platforms
Windows Server 2008 R2
Target Platforms
Windows Server 2008 R2
See Also
Reference
PreferenceExtension Class
PreferenceExtension Members
Microsoft.GroupPolicy Namespace