Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Win32_NTDomain class

The Win32_NTDomainWMI class represents a Windows domain.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties and methods are in alphabetic order, not MOF order.

Syntax

[Provider("CIMWin32a"), Dynamic]class Win32_NTDomain : CIM_System
{
  string   Caption;
  string   ClientSiteName;
  string   CreationClassName;
  string   DcSiteName;
  string   Description;
  string   DNSForestName;
  string   DomainControllerAddress;
  sint32   DomainControllerAddressType;
  string   DomainControllerName;
  string   DomainGUID;
  string   DomainName;
  boolean  DSDirectoryServiceFlag;
  boolean  DSDnsControllerFlag;
  boolean  DSDnsDomainFlag;
  boolean  DSDnsForestFlag;
  boolean  DSGlobalCatalogFlag;
  boolean  DSKerberosDistributionCenterFlag;
  boolean  DSPrimaryDomainControllerFlag;
  boolean  DSTimeServiceFlag;
  boolean  DSWritableFlag;
  datetime InstallDate;
  string   Name;
  string   NameFormat;
  string   PrimaryOwnerContact;
  string   PrimaryOwnerName;
  string   Roles;
  string   Status;
};

Members

The Win32_NTDomain class has these types of members:

Properties

The Win32_NTDomain class has these properties.

Caption
Data type: string
Access type: Read-only
Qualifiers: MaxLen (64) , Dynamic

Short description of the object. This property is inherited from CIM_ManagedSystemElement.

ClientSiteName
Data type: string
Access type: Read-only

Name of the site where the domain controller is configured. This value can be NULL.

CreationClassName
Data type: string
Access type: Read-only

Name of the first concrete class in the inheritance chain that is used to create an instance. Use this property with other properties of the class to identify all of the instances of the class and its subclasses. This property is inherited from CIM_System.

DcSiteName
Data type: string
Access type: Read-only

Name of the site where the domain controller is located. This value can be NULL.

Description
Data type: string
Access type: Read-only

Comment that describes the link. This property is inherited from CIM_ManagedSystemElement.

DNSForestName
Data type: string
Access type: Read-only

Name of the root of the DNS tree.

DomainControllerAddress
Data type: string
Access type: Read-only

Address of the discovered domain controller.

DomainControllerAddressType
Data type: sint32
Access type: Read-only

Type of address specified in the DomainControllerAddress property.

ValueMeaning
1

DNS_INET_ADDRESS

2

DNS_NETBIOS_ADDRESS

 

DomainControllerName
Data type: string
Access type: Read-only

Computer name for the discovered domain controller.

DomainGUID
Data type: string
Access type: Read-only

Globally unique identifier (GUID) of the domain controller. This property is 0 (zero) if the domain controller does not have a GUID.

DomainName
Data type: string
Access type: Read-only

Name of the domain.

Example: microsoft.com

DSDirectoryServiceFlag
Data type: boolean
Access type: Read-only

If TRUE, the domain controller is a directory service server.

DSDnsControllerFlag
Data type: boolean
Access type: Read-only

If TRUE, the Domain Controller Name is in DNS format.

Example: www.mynode.com or 135.5.33.19

DSDnsDomainFlag
Data type: boolean
Access type: Read-only

If TRUE, the DomainName value is in DNS format.

DSDnsForestFlag
Data type: boolean
Access type: Read-only

If TRUE, the DNSForestName value is in Domain Name System (DNS) format.

DSGlobalCatalogFlag
Data type: boolean
Access type: Read-only

If TRUE, the domain controller is a Global Catalog server for the DNSForestName value.

DSKerberosDistributionCenterFlag
Data type: boolean
Access type: Read-only

If TRUE, the domain controller is a Kerberos Key Distribution Center for the domain.

DSPrimaryDomainControllerFlag
Data type: boolean
Access type: Read-only

If TRUE, the domain controller is the Primary Domain Controller.

DSTimeServiceFlag
Data type: boolean
Access type: Read-only

If TRUE, the domain is running the Windows Time service.

DSWritableFlag
Data type: boolean
Access type: Read-only

If TRUE, the domain controller hosts a writeable DS or security accounts manager (SAM).

InstallDate
Data type: datetime
Access type: Read-only

Date and time an object is installed. An object does not require a value to indicate that it is installed. This property is inherited from CIM_ManagedSystemElement.

Name
Data type: string
Access type: Read-only
Qualifiers: Key, Dynamic

Name of an object. This property is inherited from CIM_ManagedSystemElement.

NameFormat
Data type: string
Access type: Read-only

Format to generate the system name—using the subclass heuristic. This property is inherited from CIM_System.

PrimaryOwnerContact
Data type: string
Access type: Read-only

Contact information for the primary system owner. This property is inherited from CIM_System.

PrimaryOwnerName
Data type: string
Access type: Read-only
Qualifiers: MaxLen (64) , Dynamic

Name of the primary system owner. This property is inherited from CIM_System.

Roles
Data type: string
Access type: Read-only

An array of strings that specify the roles the computer system plays in the IT environment. Values are defined by the IT environment in which the computer system resides. For example, for an instance of a networking system, this property might contain the string, "Switch" or "Bridge". This property is inherited from CIM_System.

Status
Data type: string
Access type: Read-only
Qualifiers: MaxLen (10) , Dynamic

Current status of an object. Various operational and nonoperational statuses can be defined. Operational statuses include: OK, Degraded, and Pred Fail, which is an element such as a SMART-enabled hard disk drive that may be functioning properly, but predicts a failure in the near future. Nonoperational statuses include: Error, Starting, Stopping, and Service, which can apply during mirror resilvering of a disk, reloading a user permissions list, or other administrative work. Not all status work is online, but the managed element is not OK or in one of the other states. This property is inherited from CIM_ManagedSystemElement.

The values are:

"OK"
"Error"
"Degraded"
"Unknown"
"Pred Fail"
"Starting"
"Stopping"
"Service"
"Stressed"
"NonRecover"
"No Contact"
"Lost Comm"

Remarks

The Win32_NTDomain class is derived from CIM_System. You can use this class to list all of the domains that can be discovered from the local computer. However, the number of domains that the provider can discover is limited by permissions, trust relationships, and network latency. To discover to which domain a particular computer belongs, you can query the Win32_ComputerSystem instance on that computer, and then check the Domain property.

Examples

The List Domain Information Using WMI VBScript code sample on TechNet Gallery uses Win32_NTDomain to retrieve information about domains discovered on the network.

The following PowerShell code sample describes how to query for Win32_NTDomain.


get-wmiobject | win32_ntDomain

On a Windows Server 2008 VM-based test system, the previous code produces the following output:

ClientSiteName          : Default-First-Site-Name
DcSiteName              : Default-First-Site-Name
Description             : GKTRAIN
DnsForestName           : gktrain.net
DomainControllerAddress : \\10.10.1.61
DomainControllerName    : \\DC1
DomainName              : GKTRAIN
Roles                   :
Status                  : OK

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

Wmipcima.mof

DLL

Wmipcima.dll

See also

Operating System Classes

 

 

Show:
© 2014 Microsoft