GroupPolicyExtension.OpenGpo Method (Boolean)

 

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

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

Syntax

protected void OpenGpo(
    bool readOnly
)
protected:
void OpenGpo(
    bool readOnly
)
member OpenGpo : 
        readOnly:bool -> unit
Protected Sub OpenGpo (
    readOnly As Boolean
)

Parameters

  • readOnly
    Type: System.Boolean

    true to open the GPO in read-only mode; otherwise, false.

Exceptions

Exception Condition
ActiveDirectoryObjectNotFoundException

An appropriate domain controller cannot be located.

ActiveDirectoryOperationException

A call to the underlying directory service caused an error.

InvalidOperationException

The GPO is already open.

ObjectDisposedException

The GroupPolicyExtension is disposed.

Remarks

The registry is not loaded.

See Also

OpenGpo Overload
GroupPolicyExtension Class
Microsoft.GroupPolicy Namespace

Return to top