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
System_CAPS_pubmethod GPDomain()

Initializes a new instance of the GPDomain class that represents the domain of the current user.

System_CAPS_pubmethod GPDomain(String)

Initializes a new instance of the GPDomain class that represents the specified domain.

System_CAPS_pubmethod 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.

System_CAPS_pubmethod 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
System_CAPS_pubproperty DomainController

Gets the name of the domain controller that is used by this GPDomain object.

System_CAPS_pubproperty DomainName

Gets the full DNS name of the current domain.

Methods

Name Description
System_CAPS_pubmethod CreateGpo(String)

Creates a new Group Policy object (GPO) with the specified display name in the domain.

System_CAPS_pubmethod CreateGpo(String, StarterGpo)

Creates a new Group Policy object (GPO) from the specified Starter GPO with the specified display name in the domain.

System_CAPS_pubmethod CreateStarterGpo(String)

Creates a new Starter Group Policy object (GPO) with the specified display name in the domain.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetAllGpos()

Retrieves all the Group Policy objects (GPOs) in the domain.

System_CAPS_pubmethod GetAllStarterGpos()

Retrieves all the Starter Group Policy objects (GPOs) in the domain.

System_CAPS_pubmethod GetGpo(Guid)

Retrieves the Group Policy object (GPO) with the specified ID (GUID) from the domain.

System_CAPS_pubmethod GetGpo(String)

Retrieves the Group Policy object (GPO) with the specified display name from the domain.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetSom(String)

Retrieves a scope of management (SOM) that represents the domain or the organizational unit (OU) at the specified path.

System_CAPS_pubmethod GetStarterGpo(Guid)

Retrieves the Starter Group Policy object (GPO) that has the specified ID (GUID) from the domain.

System_CAPS_pubmethod GetStarterGpo(String)

Retrieves the Starter Group Policy object (GPO) that has the specified display name from the domain.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetWmiFilter(String)

Retrieves the specified WMI filter from the domain.

System_CAPS_pubmethod ImportStarterGpo(String, Boolean)

Imports a Starter Group Policy object (GPO) into the domain from the specified Starter GPO cabinet (CAB) file.

System_CAPS_pubmethod 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.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod RestoreGpo(GpoBackup)

Restores a Group Policy object (GPO) to the domain from the specified GPO backup.

System_CAPS_pubmethod RestoreGpo(GpoBackup, GPStatusMessageCollection)

Restores a Group Policy object (GPO) to the domain from the specified GPO backup.

System_CAPS_pubmethod RestoreStarterGpo(StarterGpoBackup)

Restores the Starter Group Policy object (GPO) from the specified Starter GPO backup.

System_CAPS_pubmethod RestoreStarterGpo(StarterGpoBackup, GPStatusMessageCollection)

Restores the Starter Group Policy object (GPO) from the specified Starter GPO backup and returns status.

System_CAPS_pubmethod SearchGpos(GPSearchCriteria)

Queries the domain for Group Policy objects (GPOs) that match a set of search criteria.

System_CAPS_pubmethod SearchGpos(String)

Queries for Group Policy objects (GPOs) that have the specified display name.

System_CAPS_pubmethod SearchSoms(Gpo)

Retrieves a scope of management (SOM) for each container (in the domain) that the specified GPO is linked to.

System_CAPS_pubmethod SearchStarterGpos(GPSearchCriteria)

Queries the domain for Starter Group Policy object (GPO) that match a set of search criteria.

System_CAPS_pubmethod SearchStarterGpos(String)

Queries for Starter Group Policy object (GPO) that have the specified display name.

System_CAPS_pubmethod SearchWmiFilters(GPSearchCriteria)

Queries the domain for all WMI filters.

System_CAPS_pubmethod 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