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)
Syntax
protected PreferenceExtension(
Domain domain,
string gpoDisplayName,
bool isComputerConfiguration
)
protected:
PreferenceExtension(
Domain^ domain,
String^ gpoDisplayName,
bool isComputerConfiguration
)
new :
domain:Domain *
gpoDisplayName:string *
isComputerConfiguration:bool -> PreferenceExtension
Protected Sub New (
domain As Domain,
gpoDisplayName As String,
isComputerConfiguration As Boolean
)
Parameters
domain
Type: System.DirectoryServices.ActiveDirectory.DomainA Domain that represents the domain of the GPO.
gpoDisplayName
Type: System.StringThe display name of the GPO to edit.
isComputerConfiguration
Type: System.Booleantrue to edit Computer Configuration; false to edit User Configuration.
Exceptions
Exception | 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. |
See Also
PreferenceExtension Overload
PreferenceExtension Class
Microsoft.GroupPolicy Namespace
Return to top