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)
Usage
Dim domainName As String Dim domainController As String Dim instance As New GPDomain(domainName, domainController)
Syntax
'Declaration
Public Sub New ( _
domainName As String, _
domainController As String _
)
public GPDomain (
string domainName,
string domainController
)
public:
GPDomain (
String^ domainName,
String^ domainController
)
public GPDomain (
String domainName,
String domainController
)
public function GPDomain (
domainName : String,
domainController : String
)
Parameters
- domainName
The full domain name system (DNS) name of the domain.
- domainController
The 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 type | 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.
Platforms
Development Platforms
Windows Server 2008 R2
Target Platforms
Windows Server 2008 R2
See Also
Reference
GPDomain Class
GPDomain Members
Microsoft.GroupPolicy Namespace