RegistryPolicy Constructor (Domain, String, Boolean)


Initializes a new instance of the RegistryPolicy class by using the specified Domain, the display name of the Group Policy object (GPO), 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)


public RegistryPolicy(
    Domain domain,
    string gpoDisplayName,
    bool readOnly
    Domain^ domain,
    String^ gpoDisplayName,
    bool readOnly
new : 
        domain:Domain *
        gpoDisplayName:string *
        readOnly:bool -> RegistryPolicy
Public Sub New (
    domain As Domain,
    gpoDisplayName As String,
    readOnly As Boolean


  • gpoDisplayName
    Type: System.String

    The display name of the GPO to edit.

  • readOnly
    Type: System.Boolean

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


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