Examples: To find all domain controllers for domain corp.microsoft.com and display their DNS host name and site name: dsquery server -domain corp.microsoft.com | dsget server -dnsname -site To show if a domain controller with the name DC1 is also a global catalog server: dsget server cn=DC1,cn=Servers,cn=Site10,cn=Sites,cn=Configuration, dc=microsoft,dc=com -isgc To show the distinguished names of the directory partitions on a domain controller with the name DC1, type: dsget server cn=DC1,cn=Servers,cn=Site10,cn=Sites,cn=Configuration, dc=microsoft,dc=com -part To show the security principals that own the largest total number of directory objects on the directory partitions of a domain controller with the name DC1, and limiting the list to the top 5 owners, type: dsget server cn=DC1,cn=Servers,cn=Site10,cn=Sites,cn=Configuration, dc=microsoft,dc=com -topobjowner 5
Examples: To find all computers in the current domain whose name starts with "ms" and whose description starts with "desktop", ...
Examples: To find all computers that have been inactive for the last four weeks and remove them from the directory: dsquery ...
Examples: To find all connections for server CORPDC1 and show their from-end servers and enabled states. dsquery conn -to ...
Examples: To find all DCs in the current domain: dsquery server To find all DCs in the forest and display their Relative ...
Examples: To find all domain controllers for domain corp.microsoft.com and display their DNS host name and site name: dsquery ...
Examples: To find all groups in a given OU whose names start with "adm" and display their descriptions. dsquery group ou=Test,dc=microsoft,dc=com ...
Examples: To find all groups in the current domain whose name starts with "ms" and whose description starts with "admin", ...
Examples: To find all OUs in the current domain whose name starts with "ms" and whose description starts with "sales", and ...
Examples: To find all sites in North America with name starting with "north" and display their DNs: dsquery site -name north* ...