Share via


PreferenceExtension Constructor (Domain, Guid, Boolean)

 

Initializes a new instance of the PreferenceExtension class by using the specified Domain, 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(
    Domain domain,
    Guid gpoId,
    bool isComputerConfiguration
)
protected:
PreferenceExtension(
    Domain^ domain,
    Guid gpoId,
    bool isComputerConfiguration
)
new : 
        domain:Domain *
        gpoId:Guid *
        isComputerConfiguration:bool -> PreferenceExtension
Protected Sub New (
    domain As Domain,
    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

domain is null.

ActiveDirectoryObjectNotFoundException

The GPO is not found.

See Also

PreferenceExtension Overload
PreferenceExtension Class
Microsoft.GroupPolicy Namespace

Return to top