PreferenceExtension Constructor (DomainController, Guid, Boolean)

 

Initializes a new instance of the PreferenceExtension class by using the specified DomainController, the specified Group Policy object (GPO) ID (GUID), 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(
    DomainController domainController,
    Guid gpoId,
    bool isComputerConfiguration
)
protected:
PreferenceExtension(
    DomainController^ domainController,
    Guid gpoId,
    bool isComputerConfiguration
)
new : 
        domainController:DomainController *
        gpoId:Guid *
        isComputerConfiguration:bool -> PreferenceExtension
Protected Sub New (
    domainController As DomainController,
    gpoId As Guid,
    isComputerConfiguration As Boolean
)

Parameters

  • isComputerConfiguration
    Type: System.Boolean

    true to edit Computer Configuration; false to edit User Configuration.

Exceptions

Exception Condition
ArgumentNullException

domainController is null.

ActiveDirectoryObjectNotFoundException

The GPO is not found.

See Also

PreferenceExtension Overload
PreferenceExtension Class
Microsoft.GroupPolicy Namespace

Return to top