PreferenceExtension Class

 

The abstract base class from which Group Policy Object Editor preference extensions derive.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Inheritance Hierarchy

System.Object
  Microsoft.GroupPolicy.GroupPolicyExtension
    Microsoft.GroupPolicy.PreferenceExtension
      Microsoft.GroupPolicy.RegistryPreference

Syntax

public abstract class PreferenceExtension : GroupPolicyExtension
public ref class PreferenceExtension abstract : GroupPolicyExtension
[<AbstractClass>]
type PreferenceExtension = 
    class
        inherit GroupPolicyExtension
    end
Public MustInherit Class PreferenceExtension
    Inherits GroupPolicyExtension

Constructors

Name Description
System_CAPS_protmethod PreferenceExtension(DirectoryContext, Guid, Boolean)

Initializes a new instance of the PreferenceExtension class by using the specified DirectoryContext, the specified Group Policy object (GPO) ID (GUID), and a value that specifies whether to edit Computer Configuration or User Configuration.

System_CAPS_protmethod PreferenceExtension(DirectoryContext, String, Boolean)

Initializes a new instance of the PreferenceExtension class by using the specified DirectoryContext, the display name of the Group Policy object (GPO), and a value that specifies whether to edit Computer Configuration or User Configuration.

System_CAPS_protmethod PreferenceExtension(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.

System_CAPS_protmethod PreferenceExtension(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.

System_CAPS_protmethod PreferenceExtension(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.

System_CAPS_protmethod PreferenceExtension(DomainController, String, Boolean)

Initializes a new instance of the PreferenceExtension class by using the specified DomainController, the display name of the Group Policy object (GPO), and a value that specifies whether to edit Computer Configuration or User Configuration.

Properties

Name Description
System_CAPS_protproperty ClientSideExtensionGuid

When implemented in a derived class, gets the GUID of the client-side extension.(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty ComputerEditorGuid

When implemented in a derived class, gets the GUID of the editor that is used to edit Group Policy settings in the computer section of the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty Domain

Gets the domain for the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty DomainController

Gets domain controller on which the Group Policy object (GPO) is being edited.(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty Gpo

Gets the underlying GroupPolicyObject that represents the GPO being edited.(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty GpoDisplayName

Gets the display name of the Group Policy object (GPO) that is being edited.(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty GpoId

Gets the ID (GUID) of the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty GpoPath

Gets the distinguished name of the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty IsComputerConfiguration

Gets a value that indicates whether the Computer Configuration section of the Group Policy object (GPO) is being edited.

System_CAPS_protproperty IsOpened

Gets a value that indicates whether the GPO has been opened.(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty IsReadOnly

Gets a value that indicates whether the Group Policy object (GPO) is opened in read-only mode.(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty SettingsFilePath

Gets the UNC path of the XML file that contains the settings for the Group Policy object (GPO) section that is being edited.

System_CAPS_protproperty SysvolPreferenceFileName

When implemented in a derived class, gets the name of the XML file on SYSVOL that contains the preference items that are being edited.

System_CAPS_protproperty SysvolPreferenceSubdirectory

When implemented in a derived class, gets the name of the subdirectory on SYSVOL in which the XML file that contains the preference items that are being edited exists.

System_CAPS_protproperty UserEditorGuid

When implemented in a derived class, gets the GUID of the editor that is used to edit Group Policy settings in the user section of the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

Methods

Name Description
System_CAPS_pubmethod Dispose()

Releases all resources used by the current instance of the GroupPolicyExtension class.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod Dispose(Boolean)

Releases the unmanaged resources used by the GroupPolicyExtension class and optionally releases the managed resources.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

Allows a GroupPolicyExtension object to attempt to free resources and perform other cleanup operations before the object is reclaimed by garbage collection.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnOpened(EventArgs)

Called by the OpenGpo method to allow for post-processing by the derived class.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod OnOpening(EventArgs)

Occurs after the Group Policy object (GPO) has been opened, but before IsOpened is set to true.(Overrides GroupPolicyExtension.OnOpening(EventArgs).)

System_CAPS_protmethod OnSaved(EventArgs)

Called by the Save method after the save has been performed, to allow for post-processing by the derived class.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod OnSaving(SavingEventArgs)

Called by the Save method before the save is performed, to allow for pre-processing by the derived class.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod OpenGpo(Boolean)

Opens the Group Policy object (GPO) according to the specified value for read only.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod OpenGpo(Boolean, Boolean)

Opens the Group Policy object (GPO) according to the specified value for read only and optionally loads the registry.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod Save()

Saves the GPO section (Computer Configuration or User Configuration) for the Group Policy object (GPO).

System_CAPS_protmethod Save(Boolean)

Saves the specified Group Policy object (GPO) section for the GPO.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

The RegistryPreference class, which represents the Group Policy Object Editor extension for modifying Registry preference items, derives from this class.

You can derive from PreferenceExtension to create classes that represent Group Policy Object Editor extensions that modify other kinds of preference items.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.GroupPolicy Namespace

Return to top