Share via


GroupPolicyObject.Save Method (Boolean, Boolean, Guid, Guid)

 

Saves the specified registry-based policy settings to disk and updates the revision number of the GPO.

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

Syntax

public void Save(
    bool computerConfiguration,
    bool addExtensionToGpo,
    Guid clientSideExtension,
    Guid editor
)
public:
void Save(
    bool computerConfiguration,
    bool addExtensionToGpo,
    Guid clientSideExtension,
    Guid editor
)
member Save : 
        computerConfiguration:bool *
        addExtensionToGpo:bool *
        clientSideExtension:Guid *
        editor:Guid -> unit
Public Sub Save (
    computerConfiguration As Boolean,
    addExtensionToGpo As Boolean,
    clientSideExtension As Guid,
    editor As Guid
)

Parameters

  • computerConfiguration
    Type: System.Boolean

    true to save computer policy settings; false to save user policy settings.

  • addExtensionToGpo
    Type: System.Boolean

    Specifies whether this is an add or delete operation. If this parameter is false, the last policy setting for the specified extension pGuidExtension is removed. In all other cases, this parameter is true.

  • clientSideExtension
    Type: System.Guid

    Specifies the GUID or unique name of the snap-in extension that will process policy. If the GPO is to be processed by the snap-in that processes .pol files, you must specify the REGISTRY_EXTENSION_GUID value.

  • editor
    Type: System.Guid

    Specifies the GUID that identifies the MMC snap-in used to edit this policy. The snap-in can be a Microsoft snap-in or a third-party snap-in.

Exceptions

Exception Condition
ObjectDisposedException

The GroupPolicyObject is disposed.

See Also

GroupPolicyObject Class
Microsoft.GroupPolicy Namespace

Return to top