GPDomain Class
Represents a domain.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Inheritance Hierarchy
System.Object
Microsoft.GroupPolicy.GPDomain
Syntax
public class GPDomain
public ref class GPDomain
type GPDomain = class end
Public Class GPDomain
Constructors
Name | Description | |
---|---|---|
GPDomain() | Initializes a new instance of the GPDomain class that represents the domain of the current user. |
|
GPDomain(String) | Initializes a new instance of the GPDomain class that represents the specified domain. |
|
GPDomain(String, DCUsage) | Initializes a new instance of the GPDomain class that represents the specified domain. The domain controller is specified by one of the DCUsage enumeration values. |
|
GPDomain(String, String) | Initializes a new instance of the GPDomain class that represents the specified domain. The specified domain controller is used to communicate with the domain. |
Properties
Name | Description | |
---|---|---|
DomainController | Gets the name of the domain controller that is used by this GPDomain object. |
|
DomainName | Gets the full DNS name of the current domain. |
Methods
Name | Description | |
---|---|---|
CreateGpo(String) | Creates a new Group Policy object (GPO) with the specified display name in the domain. |
|
CreateGpo(String, StarterGpo) | Creates a new Group Policy object (GPO) from the specified Starter GPO with the specified display name in the domain. |
|
CreateStarterGpo(String) | Creates a new Starter Group Policy object (GPO) with the specified display name in the domain. |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetAllGpos() | Retrieves all the Group Policy objects (GPOs) in the domain. |
|
GetAllStarterGpos() | Retrieves all the Starter Group Policy objects (GPOs) in the domain. |
|
GetGpo(Guid) | Retrieves the Group Policy object (GPO) with the specified ID (GUID) from the domain. |
|
GetGpo(String) | Retrieves the Group Policy object (GPO) with the specified display name from the domain. |
|
GetHashCode() | (Inherited from Object.) |
|
GetSom(String) | Retrieves a scope of management (SOM) that represents the domain or the organizational unit (OU) at the specified path. |
|
GetStarterGpo(Guid) | Retrieves the Starter Group Policy object (GPO) that has the specified ID (GUID) from the domain. |
|
GetStarterGpo(String) | Retrieves the Starter Group Policy object (GPO) that has the specified display name from the domain. |
|
GetType() | (Inherited from Object.) |
|
GetWmiFilter(String) | Retrieves the specified WMI filter from the domain. |
|
ImportStarterGpo(String, Boolean) | Imports a Starter Group Policy object (GPO) into the domain from the specified Starter GPO cabinet (CAB) file. |
|
ImportStarterGpo(String, Boolean, GPStatusMessageCollection) | Imports a Starter Group Policy object (GPO) into the domain from the specified Starter GPO cabinet (CAB) file and return status. |
|
MemberwiseClone() | (Inherited from Object.) |
|
RestoreGpo(GpoBackup) | Restores a Group Policy object (GPO) to the domain from the specified GPO backup. |
|
RestoreGpo(GpoBackup, GPStatusMessageCollection) | Restores a Group Policy object (GPO) to the domain from the specified GPO backup. |
|
RestoreStarterGpo(StarterGpoBackup) | Restores the Starter Group Policy object (GPO) from the specified Starter GPO backup. |
|
RestoreStarterGpo(StarterGpoBackup, GPStatusMessageCollection) | Restores the Starter Group Policy object (GPO) from the specified Starter GPO backup and returns status. |
|
SearchGpos(GPSearchCriteria) | Queries the domain for Group Policy objects (GPOs) that match a set of search criteria. |
|
SearchGpos(String) | Queries for Group Policy objects (GPOs) that have the specified display name. |
|
SearchSoms(Gpo) | Retrieves a scope of management (SOM) for each container (in the domain) that the specified GPO is linked to. |
|
SearchStarterGpos(GPSearchCriteria) | Queries the domain for Starter Group Policy object (GPO) that match a set of search criteria. |
|
SearchStarterGpos(String) | Queries for Starter Group Policy object (GPO) that have the specified display name. |
|
SearchWmiFilters(GPSearchCriteria) | Queries the domain for all WMI filters. |
|
ToString() | (Inherited from Object.) |
Remarks
The GPDomain class supports methods and properties that you can use to perform the following tasks:
Query scope of management (SOM) objects.
Create, restore and query Group Policy objects (GPOs).
Create and query Windows Management Instrumentation (WMI) filters.
This class wraps both the IGPMDomain and the IGPMDomain2 COM interfaces.
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