GPDomain Constructor (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.
Namespace: Microsoft.GroupPolicy
Assembly: Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)
Syntax
public GPDomain(
string domainName,
string domainController
)
public:
GPDomain(
String^ domainName,
String^ domainController
)
new :
domainName:string *
domainController:string -> GPDomain
Public Sub New (
domainName As String,
domainController As String
)
Parameters
domainName
Type: System.StringThe full domain name system (DNS) name of the domain.
domainController
Type: System.StringThe name of the domain controller to use with the domain. The name can be specified as the full DNS name or the NetBIOS name.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The domainName parameter or the domainController parameter is an empty string (“”). |
ArgumentNullException | The domainName parameter or the domainController parameter is null. |
Remarks
The new GPDomain object represents the specified domain. The specified domain controller is used to communicate with the domain.
The full DNS name of the domain is also known as the fully-qualified domain name (FQDN); for example, sales.contoso.com.
See Also
GPDomain Overload
GPDomain Class
Microsoft.GroupPolicy Namespace
Return to top