Examples: To find all users in the current domain only whose SAM account name begins with the string "jon" and display their SAM account name, User Principal Name (UPN) and department in table format: dsquery * domainroot -filter "((objectCategory=Person)(objectClass=User)(sAMAccountName=jon*))" -attr sAMAccountName userPrincipalName department To read the sAMAccountName, userPrincipalName and department attributes of the object whose DN is ou=Test,dc=microsoft,dc=com: Dsquery * ou=Test,dc=microsoft,dc=com -scope base -attr sAMAccountName userPrincipalName department To read all attributes of the object whose DN is ou=Test,dc=microsoft,dc=com: Dsquery * ou=Test,dc=microsoft,dc=com -scope base -attr *
Examples: To find all sites in North America with name starting with "north" and display their DNs: dsquery site -name north* ...
Examples: To find all subnets with the network IP address starting with 123.12: dsquery subnet -name 123.12.* To find all ...
Examples: To find all users in a given organizational unit (OU) whose name starts with "jon" and whose account has been disabled ...
Examples: To find all users in a given OU whose names start with "jon" and display their descriptions, type: dsquery user ...
Examples: To find all users in the current domain only whose SAM account name begins with the string "jon" and display their ...
Examples: To find all users in the organizational unit (OU) "ou=Marketing,dc=microsoft,dc=com" and add them to the Marketing ...
Examples: To list all of the quota specifications in the current domain, type: type: dsquery quota domainroot To list all ...
Examples: To list the DNs of all directory partitions in the forest, type: dsquery partition To list the DNs of all directory ...
Examples: To modify the descriptions for the subnet "123.56.15.0/24": dsget subnet "123.56.15.0/24" -desc "test lab" See ...