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.
Provides methods to create and modify a GPO directly, without using the Group Policy Object Editor.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management.Interop (in Microsoft.GroupPolicy.Management.Interop.dll)
Inheritance Hierarchy
System.Object
Microsoft.GroupPolicy.GroupPolicyObject
Syntax
public sealed class GroupPolicyObject : IDisposable
public ref class GroupPolicyObject sealed : IDisposable
[<Sealed>]
type GroupPolicyObject =
class
interface IDisposable
end
Public NotInheritable Class GroupPolicyObject
Implements IDisposable
Constructors
Name | Description | |
---|---|---|
![]() |
GroupPolicyObject() | Initializes a new instance of the GroupPolicyObject class. |
Properties
Name | Description | |
---|---|---|
![]() |
DisplayName | Gets or sets the display name for the Group Policy object (GPO). |
![]() |
GpoType | Gets the type for the Group Policy object (GPO). |
![]() |
IsComputerEnabled | Gets or sets a value that specifies whether the computer portion of the Group Policy object (GPO) is enabled. |
![]() |
IsUserEnabled | Gets or sets a value that specifies whether the user portion of the Group Policy object (GPO) is enabled. |
![]() |
Name | Gets the (unique) name of the Group Policy object (GPO). |
![]() |
Path | Gets the path to the Group Policy object (GPO). |
Methods
Name | Description | |
---|---|---|
![]() |
CreateNew(Domain, String, Boolean, Boolean) | Creates a new Group Policy object (GPO) with the specified display name in the specified domain. |
![]() |
CreateNew(String, String, Boolean, Boolean) | Creates a new Group Policy object (GPO) with the specified display name by using the Active Directory path to a domain or a domain controller. |
![]() |
Delete() | Deletes the Group Policy object (GPO) represented by this GroupPolicyObject. |
![]() |
DeleteAllValues(RegistryHive, String) | Deletes the registry-based policy settings for a registry key and all its values from the Group Policy object (GPO). |
![]() |
DeleteValue(RegistryHive, String, String) | Deletes the registry-based policy setting for a registry value from the Group Policy object (GPO). |
![]() |
Dispose() | Releases all resources used by the current instance of the GroupPolicyObject. |
![]() |
Equals(Object) | (Inherited from Object.) |
![]() |
GetDSPath(GpoSection) | Retrieves the Active Directory path to the root of the specified Group Policy object (GPO) section. |
![]() |
GetFileSystemPath(GpoSection) | Retrieves the file system path to the root of the specified Group Policy object (GPO) section. The path is in UNC format. |
![]() |
GetHashCode() | (Inherited from Object.) |
![]() |
GetRegistrySetting(RegistryHive, String, String) | Retrieves the registry-based policy setting for the specified registry value from the Group Policy object (GPO). |
![]() |
GetRegistrySettings(RegistryHive, String) | Retrieves the registry-based policy settings for a registry key and all its values from the Group Policy object (GPO). |
![]() |
GetType() | (Inherited from Object.) |
![]() |
OpenDSGpo(Domain, Guid, Boolean, Boolean) | Opens the Group Policy object (GPO) that has the specified GUID by using the domain specified by the Domain object. |
![]() |
OpenDSGpo(DomainController, Guid, Boolean, Boolean) | Opens the Group Policy object (GPO) that has the specified GUID by using the specified domain controller. |
![]() |
OpenDSGpo(String, Boolean, Boolean) | Opens the Group Policy object (GPO) that has the specified path. |
![]() |
Save(Boolean, Boolean, Guid, Guid) | Saves the specified registry-based policy settings to disk and updates the revision number of the GPO. |
![]() |
SetRegistrySetting(PolicyRegistrySetting) | Sets a new registry-based policy setting in the Group Policy object (GPO) based on the specified PolicyRegistrySetting. |
![]() |
ToString() | (Inherited from Object.) |
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.GroupPolicy Namespace
Return to top