RegistryPolicy Constructor (DomainController, Guid, Boolean)

 

Initializes a new instance of the RegistryPolicy class by using the specified DomainController, the specified Group Policy object (GPO) ID (GUID), and a value that specifies whether to open the GPO in read-only mode.

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

Syntax

public RegistryPolicy(
    DomainController domainController,
    Guid gpoId,
    bool readOnly
)
public:
RegistryPolicy(
    DomainController^ domainController,
    Guid gpoId,
    bool readOnly
)
new : 
        domainController:DomainController *
        gpoId:Guid *
        readOnly:bool -> RegistryPolicy
Public Sub New (
    domainController As DomainController,
    gpoId As Guid,
    readOnly As Boolean
)

Parameters

  • readOnly
    Type: System.Boolean

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

Remarks

This constructor calls the GroupPolicyExtension constructor and OpenGpo methods. Exceptions thrown from those methods will be passed back to the caller of this constructor.

See Also

RegistryPolicy Overload
RegistryPolicy Class
Microsoft.GroupPolicy Namespace

Return to top