Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of the RegistryPolicy class by using the specified DirectoryContext, 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(
DirectoryContext context,
Guid gpoId,
bool readOnly
)
public:
RegistryPolicy(
DirectoryContext^ context,
Guid gpoId,
bool readOnly
)
new :
context:DirectoryContext *
gpoId:Guid *
readOnly:bool -> RegistryPolicy
Public Sub New (
context As DirectoryContext,
gpoId As Guid,
readOnly As Boolean
)
Parameters
context
Type: System.DirectoryServices.ActiveDirectory.DirectoryContextA DirectoryContext that identifies the context with which the directory is accessed. This includes the directory, the domain, and the credentials that are used to access the directory.
gpoId
Type: System.GuidThe GUID of the GPO to edit.
readOnly
Type: System.Booleantrue 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