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)

Usage

    Dim domainController As DomainController
Dim gpoId As Guid
Dim isComputerConfiguration As Boolean

Dim instance As New PreferenceExtension(domainController, gpoId, isComputerConfiguration)

Syntax

'Declaration
Protected Sub New ( _
    domainController As DomainController, _
    gpoId As Guid, _
    isComputerConfiguration As Boolean _
)
protected PreferenceExtension (
    DomainController domainController,
    Guid gpoId,
    bool isComputerConfiguration
)
protected:
PreferenceExtension (
    DomainController^ domainController, 
    Guid gpoId, 
    bool isComputerConfiguration
)
protected PreferenceExtension (
    DomainController domainController, 
    Guid gpoId, 
    boolean isComputerConfiguration
)
protected function PreferenceExtension (
    domainController : DomainController, 
    gpoId : Guid, 
    isComputerConfiguration : boolean
)

Parameters

  • domainController
    A DomainController object that represents the domain controller to use.
  • gpoId
    The GUID of the GPO to edit.
  • isComputerConfiguration
    true to edit Computer Configuration; false to edit User Configuration.

Exceptions

Exception type Condition
ArgumentNullException

domainController is null.

ActiveDirectoryObjectNotFoundException

The GPO is not found.

Platforms

Development Platforms

Windows Server 2008 R2

Target Platforms

Windows Server 2008 R2

See Also

Reference

PreferenceExtension Class
PreferenceExtension Members
Microsoft.GroupPolicy Namespace