List all OUs:

C:\\> dsquery ou DC=<DOMAIN>,DC=<DOMAIN EXTENSION>

List of workstations in the domain:

C:\\> netdom query WORKSTATION

List of servers in the domain:

C:\\> netdom query SERVER

List of domain controllers:

C:\\> netdom query DC

List of organizational units under which the specified user can create a machine object:

C:\\> netdom query OU

List of primary domain controller:

C:\\> netdom query PDC

List the domain trusts:

C:\\> netdom query TRUST

Query the domain for the current list of FSMO owners

C:\\> netdom query FSMO

List all computers from Active Directory:

C:\\> dsquery COMPUTER "OU=servers,DC=<DOMAIN
NAME>,DC=<DOMAIN EXTENSION>" -o rdn -limit 0 >
C:\\machines.txt

List user accounts inactive longer than 3 weeks:

C:\\> dsquery user domainroot -inactive 3