Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1256 lines
59 KiB

  1. ;//+-------------------------------------------------------------------------
  2. ;//
  3. ;// Microsoft Windows
  4. ;//
  5. ;// Copyright (C) Microsoft Corporation, 2000 - 2000
  6. ;//
  7. ;// File: usage.mc
  8. ;// Author: micretz
  9. ;//--------------------------------------------------------------------------
  10. MessageId=1
  11. SymbolicName=USAGE_DSQUERY
  12. Language=English
  13. Description: This tool's commands suite allow you to query the directory according to specified criteria. Each of the following dsquery commands finds objects of a specific object type, with the exception of dsquery *, which can query for any type of object:
  14. dsquery computer - finds computers in the directory.
  15. dsquery contact - finds contacts in the directory.
  16. dsquery subnet - finds subnets in the directory.
  17. dsquery group - finds groups in the directory.
  18. dsquery ou - finds organizational units in the directory.
  19. dsquery site - finds sites in the directory.
  20. dsquery server - finds domain controllers in the directory.
  21. dsquery user - finds users in the directory.
  22. dsquery * - finds any object in the directory by using a generic LDAP query.
  23. For help on a specific command, type "dsquery <ObjectType> /?" where <ObjectType> is
  24. one of the supported object types shown above. For example, dsquery ou /?.
  25. Remarks:
  26. The dsquery commands help you find objects in the directory that match
  27. a specified search criterion: the input to dsquery is a search criterion
  28. and the output is a list of objects matching the search. To get the
  29. properties of a specific object, use the dsget commands (dsget /?).
  30. The results from a dsquery command can be piped as input to one of the other directory service command-line tools, such as dsmod, dsget, dsrm or dsmove.
  31. Examples:
  32. To find all computers that have been inactive for the last four weeks and remove them from the directory:
  33. dsquery computer -inactive 4 | dsrm
  34. To find all users in the organizational unit "ou=Marketing,dc=microsoft,dc=com" and add them to the Marketing Staff group:
  35. dsquery user startnode ou=Marketing,dc=microsoft,dc=com |
  36. dsmod group "cn=Marketing Staff,ou=Marketing,dc=microsoft,dc=com" -addmbr
  37. To find all users with names starting with "John" and display his office number:
  38. dsquery user -name John* | dsget user -office
  39. To display an arbitrary set of attributes of any given object in the directory use the dsquery * command. For example, to display the sAMAccountName, userPrincipalName and department attributes of the object whose DN is ou=Test,dc=microsoft,dc=com:
  40. Dsquery * -startnode ou=Test,dc=microsoft,dc=com -scope base -attr sAMAccountName userPrincipalName department
  41. To read all attributes of the object whose DN is ou=Test,dc=microsoft,dc=com:
  42. Dsquery * -startnode ou=Test,dc=microsoft,dc=com -scope base -attr *
  43. Directory Service command-line tools help:
  44. dsadd /? - help for adding objects.
  45. dsget /? - help for displaying objects.
  46. dsmod /? - help for modifying objects.
  47. dsmove /? - help for moving objects.
  48. dsquery /? - help for finding objects matching search criteria.
  49. dsrm /? - help for deleting objects.
  50. .
  51. MessageId=2
  52. SymbolicName=USAGE_DSQUERY_STAR
  53. Language=English
  54. Description: Finds any objects in the directory according to criteria.
  55. Syntax: dsquery *
  56. [-startnode {forestroot | domainroot | <StartDN>}]
  57. [-scope {subtree | onelevel | base}]
  58. [-filter <LDAPFilter>]
  59. [-attr {<AttrList> | *}]
  60. [-attrsonly]
  61. [-L]
  62. [{-s <Server> | -d <Domain>}]
  63. [-u <UserName>]
  64. [-p {<Password> | *}]
  65. [-q]
  66. [-R]
  67. [-gc]
  68. Parameters:
  69. Value Description
  70. -startnode {forestroot | domainroot | <StartDN>}
  71. Specifies the node where search should start:
  72. forest root, domain root, or a node whose
  73. distinguished name (DN) is <StartDN>.
  74. Default: domainroot.
  75. -scope {subtree | onelevel | base}
  76. Specifies the scope of the search:
  77. subtree rooted at start node (subtree);
  78. immediate children of start node only (onelevel);
  79. the base object represented by start node (base).
  80. Note that subtree and domain scope
  81. are essentially the same for any start node
  82. unless the start node represents a domain root.
  83. Default: subtree.
  84. -filter <LDAPFilter> Specifies that the search use the explicit
  85. LDAP search filter <LDAPFilter> specified in the
  86. LDAP search filter format for searching.
  87. Default:(objectCategory=*).
  88. -attr {<AttrList> | *} If <AttrList>, specifies a space-separated list
  89. of LDAP display names to be returned for
  90. each entry in the result set.
  91. If *, specifies all attributes present on
  92. the objects in the result set.
  93. Default: distinguishedName.
  94. -attrsonly Shows only the attribute types present on
  95. the entries in the result set but not
  96. their values.
  97. Default: shows both attribute type and value.
  98. -L Shows the entries in the search result set
  99. in a list format. Default: table format.
  100. {-s <Server> | -d <Domain>}
  101. -s <Server> connects to the domain controller (DC)
  102. with name <Server>. Default: local system.
  103. -d <Domain> connects to a DC in domain <Domain>.
  104. Default: a DC in the logon domain.
  105. -u <UserName> Connect as <UserName>. Default: the logged in user.
  106. -p <Password> Password for the user <UserName>. If * then prompt for
  107. password.
  108. -q Quiet mode: suppress all output to standard output.
  109. -R Recurse or follow referrals during search. Default: do
  110. not chase referrals during search.
  111. -gc Search in the Active Directory global catalog.
  112. -limit <NumObjects> Specifies the number of objects matching the given criteria
  113. to be returned, where <NumObjects> is the number of objects
  114. to be returned. If the value of <NumObjects> is 0, all
  115. matching objects are returned. If this parameter is not
  116. specified, by default the first 100 results are displayed.
  117. Remarks:
  118. The dsquery commands help you find objects in the directory that match
  119. a specified search criterion: the input to dsquery is a search criteria
  120. and the output is a list of objects matching the search. To get the
  121. properties of a specific object, use the dsget commands (dsget /?).
  122. The syntax for this command is fixed.
  123. A user-entered value containing spaces or semicolons must be enclosed in quotes ("").
  124. Multiple user-entered values must be separated using commas
  125. (for example, a list of attribute types).
  126. Examples:
  127. To find all users in the current domain only whose SAM account name begins with
  128. the string "jon" and display their SAM account name,
  129. User Principal Name (UPN) and department in table format:
  130. dsquery * -startnode domainroot
  131. -filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountName=jon*))"
  132. -attr sAMAccountName userPrincipalName department
  133. To read the sAMAccountName, userPrincipalName and department attributes of the object whose DN is ou=Test,dc=microsoft,dc=com:
  134. Dsquery * -startnode ou=Test,dc=microsoft,dc=com -scope base -attr sAMAccountName userPrincipalName department
  135. To read all attributes of the object whose DN is ou=Test,dc=microsoft,dc=com:
  136. Dsquery * -startnode ou=Test,dc=microsoft,dc=com -scope base -attr *
  137. See also:
  138. dsquery computer /? - help for finding computers in the directory.
  139. dsquery contact /? - help for finding contacts in the directory.
  140. dsquery subnet /? - help for finding subnets in the directory.
  141. dsquery group /? - help for finding groups in the directory.
  142. dsquery ou /? - help for finding organizational units in the directory.
  143. dsquery site /? - help for finding sites in the directory.
  144. dsquery server /? - help for finding servers in the directory.
  145. dsquery user /? - help for finding users in the directory.
  146. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  147. Directory Service command-line tools help:
  148. dsadd /? - help for adding objects.
  149. dsget /? - help for displaying objects.
  150. dsmod /? - help for modifying objects.
  151. dsmove /? - help for moving objects.
  152. dsquery /? - help for finding objects matching search criteria.
  153. dsrm /? - help for deleting objects.
  154. .
  155. MessageId=3
  156. SymbolicName=USAGE_DSQUERY_USER
  157. Language=English
  158. Description: Finds users in the directory per given criteria.
  159. Syntax: dsquery user
  160. [-o {dn | rdn | upn | samid}]
  161. [-startnode {forestroot | domainroot | <StartDN>}]
  162. [-scope {subtree | onelevel | base}]
  163. [-name <Filter>]
  164. [-desc <Filter>]
  165. [-upn <Filter>]
  166. [-samid <Filter>]
  167. [-inactive <NumWeeks>]
  168. [-stalepwd <NumDays>]
  169. [-disabled]
  170. [{-s <Server> | -d <Domain>}]
  171. [-u <UserName>]
  172. [-p {<Password> | *}]
  173. [-q]
  174. [-R]
  175. [-gc]
  176. [-limit <NumObjects>]
  177. Parameters:
  178. Value Description
  179. -o {dn | rdn | upn | samid}
  180. Specifies the output format.
  181. Default: distinguished name (DN).
  182. -startnode {forestroot | domainroot | <StartDN>}
  183. Specifies the node where search should start:
  184. forest root, domain root, or a node whose
  185. DN is <StartDN>. Default: domainroot.
  186. -scope {subtree | onelevel | base}
  187. Sets the scope of the search:
  188. subtree rooted at start node (subtree);
  189. immediate children of start node only (onelevel);
  190. the base object represented by start node (base).
  191. Note that subtree and domain scope are essentially the
  192. same for any start node unless the start node
  193. represents a domain root. Default:subtree.
  194. -name <Filter> Finds users whose name matches the filter
  195. given by <Filter>, e.g., "jon*" or "*ith"
  196. or "j*th".
  197. -desc <Filter> Finds users whose description matches the
  198. filter given by <Filter>, e.g., "jon*" or "*ith"
  199. or "j*th".
  200. -upn <Filter> Finds users whose UPN matches the filter given
  201. by <Filter>.
  202. -samid <Filter> Finds users whose SAM account name matches the
  203. filter given by <Filter>.
  204. -inactive <NumWeeks> Finds users that have been inactive (not
  205. logged on) for at least <NumWeeks> number of weeks.
  206. -stalepwd <NumDays> Finds users that have not changed their password
  207. for at least <NumDays> number of days.
  208. -disabled Finds users whose account is disabled.
  209. {-s <Server> | -d <Domain>}
  210. -s <Server> connects to the domain controller (DC)
  211. with name <Server>. Default: local system.
  212. -d <Domain> connects to a DC in domain <Domain>.
  213. Default: a DC in the logon domain.
  214. -u <UserName> Connect as <UserName>. Default: the logged in user.
  215. -p <Password> Password for the user <UserName>. If * then prompt for
  216. password.
  217. -q Quiet mode: suppress all output to standard output.
  218. -R Recurse or follow referrals during search. Default: do
  219. not chase referrals during search.
  220. -gc Search in the Active Directory global catalog.
  221. -limit <NumObjects> Specifies the number of objects matching the given criteria
  222. to be returned, where <NumObjects> is the number of objects
  223. to be returned. If the value of <NumObjects> is 0, all
  224. matching objects are returned. If this parameter is not
  225. specified, by default the first 100 results are displayed.
  226. Remarks:
  227. The dsquery commands help you find objects in the directory that match
  228. a specified search criterion: the input to dsquery is a search criteria
  229. and the output is a list of objects matching the search. To get the
  230. properties of a specific object, use the dsget commands (dsget /?).
  231. If a value that you supply contains spaces, use quotation marks
  232. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  233. If you enter multiple values, the values must be separated by spaces
  234. (for example, a list of distinguished names).
  235. Examples:
  236. To find all users in a given organizational unit (OU)
  237. whose name starts with "jon" and whose account has been disabled
  238. for logon and display their user princial names (UPNs):
  239. dsquery user -o upn -startnode ou=Test,dc=microsoft,dc=com -name jon* -disabled
  240. To find all users in only the current domain, whose names end with "smith" and who
  241. have been inactive for 3 weeks or more, and display their DNs:
  242. dsquery user -startnode domainroot -name *smith -inactive 3
  243. To find all users in the OU given by ou=sales,dc=microsoft,dc=com and display their UPNs:
  244. dsquery user -o upn -startnode ou=sales,dc=microsoft,dc=com
  245. See also:
  246. dsquery computer /? - help for finding computers in the directory.
  247. dsquery contact /? - help for finding contacts in the directory.
  248. dsquery subnet /? - help for finding subnets in the directory.
  249. dsquery group /? - help for finding groups in the directory.
  250. dsquery ou /? - help for finding organizational units in the directory.
  251. dsquery site /? - help for finding sites in the directory.
  252. dsquery server /? - help for finding servers in the directory.
  253. dsquery user /? - help for finding users in the directory.
  254. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  255. Directory Service command-line tools help:
  256. dsadd /? - help for adding objects.
  257. dsget /? - help for displaying objects.
  258. dsmod /? - help for modifying objects.
  259. dsmove /? - help for moving objects.
  260. dsquery /? - help for finding objects matching search criteria.
  261. dsrm /? - help for deleting objects.
  262. .
  263. MessageId=4
  264. SymbolicName=USAGE_DSQUERY_COMPUTER
  265. Language=English
  266. Description: Finds computers in the directory per given criteria.
  267. criteria
  268. Syntax: dsquery computer
  269. [-o {dn | rdn | samid}]
  270. [-startnode {forestroot | domainroot | <StartDN>}]
  271. [-scope {subtree | onelevel | base}]
  272. [-name <Filter>]
  273. [-desc <Filter>]
  274. [-samid <Filter>]
  275. [-inactive <NumWeeks>]
  276. [-stalepwd <NumDays>]
  277. [-disabled]
  278. [{-s <Server> | -d <Domain>}]
  279. [-u <UserName>]
  280. [-p {<Password> | *}]
  281. [-q]
  282. [-R]
  283. [-gc]
  284. [-limit <NumObjects>]
  285. Parameters:
  286. Value Description
  287. -o {dn | rdn | samid} Specifies the output format.
  288. Default: distinguished name (DN).
  289. -startnode {forestroot | domainroot | <StartDN>}
  290. Specifies the node where search should start:
  291. forest root, domain root, or a node
  292. whose DN is <StartDN>. Default: domainroot.
  293. -scope {subtree | onelevel | base}
  294. Scope of the search: subtree rooted at start
  295. node (subtree); immediate children of start
  296. node only (onelevel); the base object
  297. represented by start node (base). Note that
  298. subtree and domain scope are essentially the
  299. same for any start node unless the start node
  300. represents a domain root. Default: subtree.
  301. -name <Filter> Finds computers whose name matches the value given
  302. by <Filter>, e.g., "jon*" or "*ith" or "j*th".
  303. -desc <Filter> Finds computers whose description matches the value
  304. given by <Filter>, e.g., "jon*" or "*ith"
  305. or "j*th".
  306. -samid <Filter> Finds computers whose SAM account name matches the
  307. filter given by <Filter>.
  308. -inactive <NumWeeks> Finds computers that have been inactive (stale)
  309. for at least <NumWeeks> number of weeks.
  310. -stalepwd <NumDays> Finds computers that have not changed their password
  311. for at least <NumDays> number of days.
  312. -disabled Finds computers whose account is disabled.
  313. {-s <Server> | -d <Domain>}
  314. -s <Server> connects to the domain controller (DC)
  315. with name <Server>. Default: local system.
  316. -d <Domain> connects to a DC in domain <Domain>.
  317. Default: a DC in the logon domain.
  318. -u <UserName> Connect as <UserName>. Default: the logged in user.
  319. -p <Password> Password for the user <UserName>. If * then prompt for
  320. password.
  321. -q Quiet mode: suppress all output to standard output.
  322. -R Recurse or follow referrals during search. Default: do
  323. not chase referrals during search.
  324. -gc Search in the Active Directory global catalog.
  325. -limit <NumObjects> Specifies the number of objects matching the given criteria
  326. to be returned, where <NumObjects> is the number of objects
  327. to be returned. If the value of <NumObjects> is 0, all
  328. matching objects are returned. If this parameter is not
  329. specified, by default the first 100 results are displayed.
  330. Remarks:
  331. The dsquery commands help you find objects in the directory that match
  332. a specified search criterion: the input to dsquery is a search criteria
  333. and the output is a list of objects matching the search. To get the
  334. properties of a specific object, use the dsget commands (dsget /?).
  335. If a value that you supply contains spaces, use quotation marks
  336. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  337. If you enter multiple values, the values must be separated by spaces
  338. (for example, a list of distinguished names).
  339. Examples:
  340. To find all computers in the current domain whose name starts with "ms"
  341. and whose description starts with "desktop", and display their DNs:
  342. dsquery computer -startnode domainroot -name ms* -desc desktop*
  343. To find all computers in the organizational unit (OU) given
  344. by ou=sales,dc=micrsoft,dc=com and display their DNs:
  345. dsquery computer -startnode ou=sales,dc=microsoft,dc=com
  346. See also:
  347. dsquery computer /? - help for finding computers in the directory.
  348. dsquery contact /? - help for finding contacts in the directory.
  349. dsquery subnet /? - help for finding subnets in the directory.
  350. dsquery group /? - help for finding groups in the directory.
  351. dsquery ou /? - help for finding organizational units in the directory.
  352. dsquery site /? - help for finding sites in the directory.
  353. dsquery server /? - help for finding servers in the directory.
  354. dsquery user /? - help for finding users in the directory.
  355. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  356. Directory Service command-line tools help:
  357. dsadd /? - help for adding objects.
  358. dsget /? - help for displaying objects.
  359. dsmod /? - help for modifying objects.
  360. dsmove /? - help for moving objects.
  361. dsquery /? - help for finding objects matching search criteria.
  362. dsrm /? - help for deleting objects.
  363. .
  364. MessageId=5
  365. SymbolicName=USAGE_DSQUERY_GROUP
  366. Language=English
  367. Description: Finds groups in the directory per given criteria.
  368. Syntax: dsquery group
  369. [-o {dn | rdn | samid}]
  370. [-startnode {forestroot | domainroot | <StartDN>}]
  371. [-scope {subtree | onelevel | base}]
  372. [-name <Filter>]
  373. [-desc <Filter>]
  374. [-samid <Filter>]
  375. [{-s <Server> | -d <Domain>}]
  376. [-u <UserName>]
  377. [-p {<Password> | *}]
  378. [-q]
  379. [-R]
  380. [-gc]
  381. [-limit <NumObjects>]
  382. Parameters:
  383. Value Description
  384. -o {dn | rdn | samid} Specifies the output format.
  385. Default: distinguished name (DN).
  386. -startnode {forestroot | domainroot | <StartDN>}
  387. Specifies the node where search should start:
  388. forest root, domain root, or a node
  389. with a DN matching <StartDN>. Default: domainroot.
  390. -scope {subtree | onelevel | base}
  391. Specifies the scope of the search:
  392. subtree rooted at start node (subtree);
  393. immediate children of start node only (onelevel);
  394. the base object represented by start node (base).
  395. Note that subtree and domain scope are essentially
  396. the same for any start node unless
  397. the start node represents a domain root.
  398. Default: subtree.
  399. -name <Filter> Find groups whose name matches the value given
  400. by <Filter>, e.g., "jon*" or "*ith"
  401. or "j*th".
  402. -desc <Filter> Find groups whose description matches the value
  403. given by <Filter>, e.g., "jon*" or "*ith"
  404. or "j*th".
  405. -samid <Filter> Find groups whose SAM account name matches the
  406. value given by <Filter>.
  407. {-s <Server> | -d <Domain>}
  408. -s <Server> connects to the domain controller (DC)
  409. with name <Server>. Default: local system.
  410. -d <Domain> connects to a DC in domain <Domain>.
  411. Default: a DC in the logon domain.
  412. -u <UserName> Connect as <UserName>. Default: the logged in user.
  413. -p <Password> Password for the user <UserName>. If * then prompt for
  414. password.
  415. -q Quiet mode: suppress all output to standard output.
  416. -R Recurse or follow referrals during search. Default: do
  417. not chase referrals during search.
  418. -gc Search in the Active Directory global catalog.
  419. -limit <NumObjects> Specifies the number of objects matching the given criteria
  420. to be returned, where <NumObjects> is the number of objects
  421. to be returned. If the value of <NumObjects> is 0, all
  422. matching objects are returned. If this parameter is not
  423. specified, by default the first 100 results are displayed.
  424. Remarks:
  425. The dsquery commands help you find objects in the directory that match
  426. a specified search criterion: the input to dsquery is a search criteria
  427. and the output is a list of objects matching the search. To get the
  428. properties of a specific object, use the dsget commands (dsget /?).
  429. If a value that you supply contains spaces, use quotation marks
  430. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  431. If you enter multiple values, the values must be separated by spaces
  432. (for example, a list of distinguished names).
  433. Examples:
  434. To find all groups in the current domain whose name starts
  435. with "ms" and whose description starts with "admin",
  436. and display their DNs:
  437. dsquery group -startnode domainroot -name ms* -desc admin*
  438. Find all groups in the domain given by dc=microsoft,dc=com
  439. and display their DNs:
  440. dsquery group -startnode dc=microsoft,dc=com
  441. See also:
  442. dsquery computer /? - help for finding computers in the directory.
  443. dsquery contact /? - help for finding contacts in the directory.
  444. dsquery subnet /? - help for finding subnets in the directory.
  445. dsquery group /? - help for finding groups in the directory.
  446. dsquery ou /? - help for finding organizational units in the directory.
  447. dsquery site /? - help for finding sites in the directory.
  448. dsquery server /? - help for finding servers in the directory.
  449. dsquery user /? - help for finding users in the directory.
  450. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  451. Directory Service command-line tools help:
  452. dsadd /? - help for adding objects.
  453. dsget /? - help for displaying objects.
  454. dsmod /? - help for modifying objects.
  455. dsmove /? - help for moving objects.
  456. dsquery /? - help for finding objects matching search criteria.
  457. dsrm /? - help for deleting objects.
  458. .
  459. MessageId=6
  460. SymbolicName=USAGE_DSQUERY_OU
  461. Language=English
  462. Description: Finds organizational units (OUs) in the directory per given criteria.
  463. Syntax: dsquery ou
  464. [-o {dn | rdn}]
  465. [-startnode {forestroot | domainroot | <StartDN>}]
  466. [-scope {subtree | onelevel | base}]
  467. [-name <Filter>]
  468. [-desc <Filter>]
  469. [{-s <Server> | -d <Domain>}]
  470. [-u <UserName>]
  471. [-p {<Password> | *}]
  472. [-q]
  473. [-R]
  474. [-gc]
  475. [-limit <NumObjects>]
  476. Parameters:
  477. Value Description
  478. -o {dn | rdn} Specifies the output format.
  479. Default: distinguished name (DN).
  480. -startnode {forestroot | domainroot | <StartDN>}
  481. Specifies the node where search should start:
  482. forest root, domain root, or a node
  483. with a DN matching <StartDN>. Default: domainroot.
  484. -scope (subtree | onelevel | base)
  485. Specifies the scope of the search:
  486. subtree rooted at start node (subtree);
  487. immediate children of start node only (onelevel);
  488. the base object represented by start node (base).
  489. Note that subtree and domain scope are essentially
  490. the same for any start node unless
  491. the start node represents a domain root.
  492. Default: subtree.
  493. -name <Filter> Find organizational units (OUs) whose name
  494. matches the value given by <Filter>,
  495. e.g., "jon*" or "*ith" or "j*th".
  496. -desc <Filter> Find OUs whose description matches the value
  497. given by <Filter>, e.g., "jon*" or "*ith"
  498. or "j*th".
  499. {-s <Server> | -d <Domain>}
  500. -s <Server> connects to the domain controller (DC)
  501. with name <Server>. Default: local system.
  502. -d <Domain> connects to a DC in domain <Domain>.
  503. Default: a DC in the logon domain.
  504. -u <UserName> Connect as <UserName>. Default: the logged in user.
  505. -p <Password> Password for the user <UserName>. If * then prompt for
  506. password.
  507. -q Quiet mode: suppress all output to standard output.
  508. -R Recurse or follow referrals during search. Default: do
  509. not chase referrals during search.
  510. -gc Search in the Active Directory global catalog.
  511. -limit <NumObjects> Specifies the number of objects matching the given criteria
  512. to be returned, where <NumObjects> is the number of objects
  513. to be returned. If the value of <NumObjects> is 0, all
  514. matching objects are returned. If this parameter is not
  515. specified, by default the first 100 results are displayed.
  516. Remarks:
  517. The dsquery commands help you find objects in the directory that match
  518. a specified search criterion: the input to dsquery is a search criteria
  519. and the output is a list of objects matching the search. To get the
  520. properties of a specific object, use the dsget commands (dsget /?).
  521. If a value that you supply contains spaces, use quotation marks
  522. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  523. If you enter multiple values, the values must be separated by spaces
  524. (for example, a list of distinguished names).
  525. Examples:
  526. To find all OUs in the current domain whose name starts with "ms"
  527. and whose description starts with "sales", and display their DNs:
  528. dsquery ou -startnode domainroot -name ms* -desc sales*
  529. To find all OUs in the domain given by dc=microsoft,dc=com and display their DNs:
  530. dsquery ou -startnode dc=microsoft,dc=com
  531. See also:
  532. dsquery computer /? - help for finding computers in the directory.
  533. dsquery contact /? - help for finding contacts in the directory.
  534. dsquery subnet /? - help for finding subnets in the directory.
  535. dsquery group /? - help for finding groups in the directory.
  536. dsquery ou /? - help for finding organizational units in the directory.
  537. dsquery site /? - help for finding sites in the directory.
  538. dsquery server /? - help for finding servers in the directory.
  539. dsquery user /? - help for finding users in the directory.
  540. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  541. Directory Service command-line tools help:
  542. dsadd /? - help for adding objects.
  543. dsget /? - help for displaying objects.
  544. dsmod /? - help for modifying objects.
  545. dsmove /? - help for moving objects.
  546. dsquery /? - help for finding objects matching search criteria.
  547. dsrm /? - help for deleting objects.
  548. .
  549. MessageId=7
  550. SymbolicName=USAGE_DSQUERY_SUBNET
  551. Language=English
  552. Description: Finds subnets in the directory per given criteria.
  553. Syntax: dsquery subnet
  554. [-o {dn | rdn}]
  555. [-name <Filter>]
  556. [-desc <Filter>]
  557. [-loc <Filter>]
  558. [-site <SiteName>]
  559. [{-s <Server> | -d <Domain>}]
  560. [-u <UserName>]
  561. [-p {<Password> | *}]
  562. [-q]
  563. [-R]
  564. [-gc]
  565. [-limit <NumObjects>]
  566. Parameters:
  567. Value Description
  568. -o {dn | rdn} Specifies the output format.
  569. Default: distinguished name (DN).
  570. -name <Filter> Find subnets whose name matches the value given
  571. by <Filter>, e.g., "10.23.*" or "12.2.*".
  572. -desc <Filter> Find subnets whose description matches the value
  573. given by <Filter>, e.g., "corp*" or "*nch"
  574. or "j*th".
  575. -loc <Filter> Find subnets whose location matches the value
  576. given by <Filter>.
  577. -site <SiteName> Find subnets that are part of site <SiteName>.
  578. {-s <Server> | -d <Domain>}
  579. -s <Server> connects to the domain controller (DC)
  580. with name <Server>. Default: local system.
  581. -d <Domain> connects to a DC in domain <Domain>.
  582. Default: a DC in the logon domain.
  583. -u <UserName> Connect as <UserName>. Default: the logged in user.
  584. -p <Password> Password for the user <UserName>. If * then prompt for
  585. password.
  586. -q Quiet mode: suppress all output to standard output.
  587. -R Recurse or follow referrals during search. Default: do
  588. not chase referrals during search.
  589. -gc Search in the Active Directory global catalog.
  590. -limit <NumObjects> Specifies the number of objects matching the given criteria
  591. to be returned, where <NumObjects> is the number of objects
  592. to be returned. If the value of <NumObjects> is 0, all
  593. matching objects are returned. If this parameter is not
  594. specified, by default the first 100 results are displayed.
  595. Remarks:
  596. The dsquery commands help you find objects in the directory that match
  597. a specified search criterion: the input to dsquery is a search criteria
  598. and the output is a list of objects matching the search. To get the
  599. properties of a specific object, use the dsget commands (dsget /?).
  600. If a value that you supply contains spaces, use quotation marks
  601. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  602. If you enter multiple values, the values must be separated by spaces
  603. (for example, a list of distinguished names).
  604. Examples:
  605. To find all subnets with the network IP address starting with 123.12:
  606. dsquery subnet -name 123.12.*
  607. To find all subnets in the site whose name is "Latin-America",
  608. and display their names as Relative distinguished names (RDNs):
  609. dsquery subnet -o rdn -site Latin-America
  610. To list the names (RDNs) of all subnets defined in the directory:
  611. dsquery subnet -o rdn
  612. See also:
  613. dsquery computer /? - help for finding computers in the directory.
  614. dsquery contact /? - help for finding contacts in the directory.
  615. dsquery subnet /? - help for finding subnets in the directory.
  616. dsquery group /? - help for finding groups in the directory.
  617. dsquery ou /? - help for finding organizational units in the directory.
  618. dsquery site /? - help for finding sites in the directory.
  619. dsquery server /? - help for finding servers in the directory.
  620. dsquery user /? - help for finding users in the directory.
  621. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  622. Directory Service command-line tools help:
  623. dsadd /? - help for adding objects.
  624. dsget /? - help for displaying objects.
  625. dsmod /? - help for modifying objects.
  626. dsmove /? - help for moving objects.
  627. dsquery /? - help for finding objects matching search criteria.
  628. dsrm /? - help for deleting objects.
  629. .
  630. MessageId=8
  631. SymbolicName=USAGE_DSQUERY_SITE
  632. Language=English
  633. Description: Finds sites in the directory per given criteria.
  634. Syntax: dsquery site
  635. [-o {dn | rdn}]
  636. [-name <Filter>]
  637. [-desc <Filter>]
  638. [{-s <Server> | -d <Domain>}]
  639. [-u <UserName>]
  640. [-p {<Password> | *}]
  641. [-q]
  642. [-R]
  643. [-gc]
  644. [-limit <NumObjects>]
  645. Parameters:
  646. Value Description
  647. -o {dn | rdn} Specifies the output format.
  648. Default: distinguished name (DN).
  649. -name <Filter> Finds subnets whose name matches the value given
  650. by <Filter>, e.g., "NA*" or "Europe*".
  651. -desc <Filter> Finds subnets whose description matches the filter
  652. given by <Filter>, e.g., "corp*" or "*nch" or "j*th".
  653. {-s <Server> | -d <Domain>}
  654. -s <Server> connects to the domain controller (DC)
  655. with name <Server>. Default: local system.
  656. -d <Domain> connects to a DC in domain <Domain>.
  657. Default: a DC in the logon domain.
  658. -u <UserName> Connect as <UserName>. Default: the logged in user.
  659. -p <Password> Password for the user <UserName>. If * then prompt for
  660. password.
  661. -q Quiet mode: suppress all output to standard output.
  662. -R Recurse or follow referrals during search. Default: do
  663. not chase referrals during search.
  664. -gc Search in the Active Directory global catalog.
  665. -limit <NumObjects>
  666. Specifies the number of objects matching the given criteria
  667. to be returned, where <NumObjects> is the number of objects
  668. to be returned. If the value of <NumObjects> is 0, all
  669. matching objects are returned. If this parameter is not
  670. specified, by default the first 100 results are displayed.
  671. Remarks:
  672. The dsquery commands help you find objects in the directory that match
  673. a specified search criterion: the input to dsquery is a search criteria
  674. and the output is a list of objects matching the search. To get the
  675. properties of a specific object, use the dsget commands (dsget /?).
  676. If a value that you supply contains spaces, use quotation marks
  677. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  678. If you enter multiple values, the values must be separated by spaces
  679. (for example, a list of distinguished names).
  680. Examples:
  681. To find all sites in North America with name starting with "north"
  682. and display their DNs:
  683. dsquery site -name north*
  684. TO list the distinguished names (RDNs) of all sites defined in the directory:
  685. dsquery site -o rdn
  686. See also:
  687. dsquery computer /? - help for finding computers in the directory.
  688. dsquery contact /? - help for finding contacts in the directory.
  689. dsquery subnet /? - help for finding subnets in the directory.
  690. dsquery group /? - help for finding groups in the directory.
  691. dsquery ou /? - help for finding organizational units in the directory.
  692. dsquery site /? - help for finding sites in the directory.
  693. dsquery server /? - help for finding servers in the directory.
  694. dsquery user /? - help for finding users in the directory.
  695. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  696. Directory Service command-line tools help:
  697. dsadd /? - help for adding objects.
  698. dsget /? - help for displaying objects.
  699. dsmod /? - help for modifying objects.
  700. dsmove /? - help for moving objects.
  701. dsquery /? - help for finding objects matching search criteria.
  702. dsrm /? - help for deleting objects.
  703. .
  704. MessageId=9
  705. SymbolicName=USAGE_DSQUERY_SLINK
  706. Language=English
  707. Description: Finds site links per given criteria.
  708. Syntax: dsquery slink
  709. [-transport {ip | smtp}]
  710. [-o {dn | rdn}]
  711. [-name <Filter>]
  712. [-desc <Filter>]
  713. [{-s <Server> | -d <Domain>}]
  714. [-u <UserName>]
  715. [-p {<Password> | *}]
  716. [-q]
  717. [-R]
  718. [-gc]
  719. [-limit <NumObjects>]
  720. Parameters:
  721. Value Description
  722. -transport {ip | smtp} Specifies site link transport type: IP or SMTP.
  723. Default: IP.
  724. -o {dn | rdn} Specifies output formats supported.
  725. Default: distinguished name (DN).
  726. -name <Filter> Finds sitelinks with names matching the value given
  727. by <Filter>, e.g., "def*" or "alt*" or "j*th".
  728. -desc <Filter> Finds sitelinks with descriptions matching the value
  729. given by <Filter>, e.g., "def*" or "alt*" or "j*th".
  730. {-s <Server> | -d <Domain>}
  731. -s <Server> connects to the domain controller (DC)
  732. with name <Server>. Default: local system.
  733. -d <Domain> connects to a DC in domain <Domain>.
  734. Default: a DC in the logon domain.
  735. -u <UserName> Connect as <UserName>. Default: the logged in user.
  736. -p <Password> Password for the user <UserName>. If * then prompt for
  737. password.
  738. -q Quiet mode: suppress all output to standard output.
  739. -R Recurse or follow referrals during search. Default: do
  740. not chase referrals during search.
  741. -gc Search in the Active Directory global catalog.
  742. -limit <NumObjects> Specifies the number of objects matching the given criteria
  743. to be returned, where <NumObjects> is the number of objects
  744. to be returned. If the value of <NumObjects> is 0, all
  745. matching objects are returned. If this parameter is not
  746. specified, by default the first 100 results are displayed.
  747. Remarks:
  748. The dsquery commands help you find objects in the directory that match
  749. a specified search criterion: the input to dsquery is a search criteria
  750. and the output is a list of objects matching the search. To get the
  751. properties of a specific object, use the dsget commands (dsget /?).
  752. If a value that you supply contains spaces, use quotation marks
  753. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  754. If you enter multiple values, the values must be separated by spaces
  755. (for example, a list of distinguished names).
  756. Examples:
  757. To find all IP-based site links whose description starts with "TransAtlantic"
  758. and display their DNs:
  759. dsquery slink -desc TransAtlantic*
  760. To list the Relative distinguished names (RDNs) of all SMTP-based site links
  761. defined in the directory:
  762. dsquery slink -transport smtp -o rdn
  763. See also:
  764. dsquery computer /? - help for finding computers in the directory.
  765. dsquery contact /? - help for finding contacts in the directory.
  766. dsquery subnet /? - help for finding subnets in the directory.
  767. dsquery group /? - help for finding groups in the directory.
  768. dsquery ou /? - help for finding organizational units in the directory.
  769. dsquery site /? - help for finding sites in the directory.
  770. dsquery server /? - help for finding servers in the directory.
  771. dsquery user /? - help for finding users in the directory.
  772. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  773. Directory Service command-line tools help:
  774. dsadd /? - help for adding objects.
  775. dsget /? - help for displaying objects.
  776. dsmod /? - help for modifying objects.
  777. dsmove /? - help for moving objects.
  778. dsquery /? - help for finding objects matching search criteria.
  779. dsrm /? - help for deleting objects.
  780. .
  781. MessageId=10
  782. SymbolicName=USAGE_DSQUERY_SLINKBR
  783. Language=English
  784. Description: Finds site link bridges per given criteria.
  785. Syntax: dsquery slinkbr
  786. [-transport {ip | smtp}]
  787. [-o {dn | rdn}]
  788. [-name <Filter>]
  789. [-desc <Filter>]
  790. [{-s <Server> | -d <Domain>}]
  791. [-u <UserName>]
  792. [-p {<Password> | *}]
  793. [-q]
  794. [-R]
  795. [-gc]
  796. [-limit <NumObjects>]
  797. Parameters:
  798. Value Description
  799. -transport {ip | smtp} Specifies the site link bridge transport type:
  800. IP or SMTP. Default:IP.
  801. -o {dn | rdn} Specifies the output format. Default: DN.
  802. -name <Filter> Finds sitelink bridges with names matching the
  803. value given by <Filter>, e.g., "def*" or
  804. "alt*" or "j*th".
  805. -desc <Filter> Finds sitelink bridges with descriptions matching
  806. the value given by <Filter>, e.g., "def*" or
  807. "alt*" or "j*th".
  808. {-s <Server> | -d <Domain>}
  809. -s <Server> connects to the domain controller (DC)
  810. with name <Server>. Default: local system.
  811. -d <Domain> connects to a DC in domain <Domain>.
  812. Default: a DC in the logon domain.
  813. -u <UserName> Connect as <UserName>. Default: the logged in user.
  814. -p <Password> Password for the user <UserName>. If * then prompt for
  815. password.
  816. -q Quiet mode: suppress all output to standard output.
  817. -R Recurse or follow referrals during search. Default: do
  818. not chase referrals during search.
  819. -gc Search in the Active Directory global catalog.
  820. -limit <NumObjects> Specifies the number of objects matching the given criteria
  821. to be returned, where <NumObjects> is the number of objects
  822. to be returned. If the value of <NumObjects> is 0, all
  823. matching objects are returned. If this parameter is not
  824. specified, by default the first 100 results are displayed.
  825. Remarks:
  826. The dsquery commands help you find objects in the directory that match
  827. a specified search criterion: the input to dsquery is a search criteria
  828. and the output is a list of objects matching the search. To get the
  829. properties of a specific object, use the dsget commands (dsget /?).
  830. If a value that you supply contains spaces, use quotation marks
  831. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  832. If you enter multiple values, the values must be separated by spaces
  833. (for example, a list of distinguished names).
  834. Examples:
  835. To find all IP-based site link bridges whose description starts with
  836. "TransAtlantic" and display their DNs:
  837. dsquery slinkbr -desc TransAtlantic*
  838. To list the Relative distinguished names (RDNs) of all SMTP-based
  839. site link bridges defined in the directory:
  840. dsquery slinkbr -transport smtp -o rdn
  841. See also:
  842. dsquery computer /? - help for finding computers in the directory.
  843. dsquery contact /? - help for finding contacts in the directory.
  844. dsquery subnet /? - help for finding subnets in the directory.
  845. dsquery group /? - help for finding groups in the directory.
  846. dsquery ou /? - help for finding organizational units in the directory.
  847. dsquery site /? - help for finding sites in the directory.
  848. dsquery server /? - help for finding servers in the directory.
  849. dsquery user /? - help for finding users in the directory.
  850. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  851. Directory Service command-line tools help:
  852. dsadd /? - help for adding objects.
  853. dsget /? - help for displaying objects.
  854. dsmod /? - help for modifying objects.
  855. dsmove /? - help for moving objects.
  856. dsquery /? - help for finding objects matching search criteria.
  857. dsrm /? - help for deleting objects.
  858. .
  859. MessageId=11
  860. SymbolicName=USAGE_DSQUERY_CONN
  861. Language=English
  862. Description: Finds replication connections per given criteria.
  863. Syntax: dsquery conn
  864. [-o {dn | rdn}]
  865. [-to <SrvName> [-from <SrvName>]]
  866. [{-s <Server> | -d <Domain>}]
  867. [-u <UserName>]
  868. [-p {<Password> | *}]
  869. [-q]
  870. [-R]
  871. [-gc]
  872. [-limit <NumObjects>]
  873. Parameters:
  874. Value Description
  875. -o {dn | rdn} Specifies output format.
  876. Default: distinguished name (DN).
  877. -to <SrvName> Finds connections whose destination is given
  878. by server <SrvName>.
  879. -from <SrvName> Finds connections whose source end is given
  880. by server <SrvName> (used along with -to parameter).
  881. {-s <Server> | -d <Domain>}
  882. -s <Server> connects to the domain controller (DC)
  883. with name <Server>. Default: local system.
  884. -d <Domain> connects to a DC in domain <Domain>.
  885. Default: a DC in the logon domain.
  886. -u <UserName> Connect as <UserName>. Default: the logged in user.
  887. -p <Password> Password for the user <UserName>. If * then prompt for
  888. password.
  889. -q Quiet mode: suppress all output to standard output.
  890. -R Recurse or follow referrals during search. Default: do
  891. not chase referrals during search.
  892. -gc Search in the Active Directory global catalog.
  893. -limit <NumObjects> Specifies the number of objects matching the given criteria
  894. to be returned, where <NumObjects> is the number of objects
  895. to be returned. If the value of <NumObjects> is 0, all
  896. matching objects are returned. If this parameter is not
  897. specified, by default the first 100 results are displayed.
  898. Remarks:
  899. The dsquery commands help you find objects in the directory that match
  900. a specified search criterion: the input to dsquery is a search criteria
  901. and the output is a list of objects matching the search. To get the
  902. properties of a specific object, use the dsget commands (dsget /?).
  903. If a value that you supply contains spaces, use quotation marks
  904. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  905. If you enter multiple values, the values must be separated by spaces
  906. (for example, a list of distinguished names).
  907. Examples:
  908. To find all connections to the domain controller whose name is "CORPDC1"
  909. and display their DNs:
  910. dsquery conn -to CORPDC1
  911. List the Relative distinguished names (RDNs) of all replication connections
  912. defined in the directory:
  913. dsquery conn -o rdn
  914. See also:
  915. dsquery computer /? - help for finding computers in the directory.
  916. dsquery contact /? - help for finding contacts in the directory.
  917. dsquery subnet /? - help for finding subnets in the directory.
  918. dsquery group /? - help for finding groups in the directory.
  919. dsquery ou /? - help for finding organizational units in the directory.
  920. dsquery site /? - help for finding sites in the directory.
  921. dsquery server /? - help for finding servers in the directory.
  922. dsquery user /? - help for finding users in the directory.
  923. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  924. Directory Service command-line tools help:
  925. dsadd /? - help for adding objects.
  926. dsget /? - help for displaying objects.
  927. dsmod /? - help for modifying objects.
  928. dsmove /? - help for moving objects.
  929. dsquery /? - help for finding objects matching search criteria.
  930. dsrm /? - help for deleting objects.
  931. .
  932. MessageId=12
  933. SymbolicName=USAGE_DSQUERY_SERVER
  934. Language=English
  935. Description: Finds domain controllers per given criteria.
  936. Syntax: dsquery server
  937. [-o {dn | rdn}]
  938. [-forest]
  939. [-domain <DomainName>]
  940. [-site <SiteName>]
  941. [-name <Filter>]
  942. [-desc <Filter>]
  943. [-hasfsmo {schema | name | infr | pdc | rid}]
  944. [-isgc]
  945. [{-s <Server> | -d <Domain>}]
  946. [-u <UserName>]
  947. [-p {<Password> | *}]
  948. [-q]
  949. [-R]
  950. [-gc]
  951. [-limit <NumObjects>]
  952. Parameters:
  953. Value Description
  954. -o {dn | rdn} Specifies output format.
  955. Default: distinguished name (DN).
  956. -forest Finds all domain controllers (DCs) in the current forest.
  957. -domain <DomainName> Finds all DCs in the domain with a DNS name
  958. matching <DomainName>.
  959. -site <SiteName> Finds all DCs that are part of site <SiteName>.
  960. -name <Filter> Finds DCs with names matching the value given
  961. by <Filter>, e.g., "NA*" or "Europe*" or "j*th".
  962. -desc <Filter> Finds DCs with descriptions matching the value
  963. given by <Filter>, e.g., "corp*" or "j*th".
  964. -hasfsmo {schema | name | infr | pdc | rid}
  965. Finds the DC that holds the specified
  966. Flexible Single-master Operation (FSMO) role.
  967. (For the "pdc" and "rid" FSMO roles, if no domain
  968. is specified with the -domain parameter, the current
  969. domain is used.)
  970. -isgc Find all DCs that are also global catalog servers (GCs)
  971. in the scope specified (if the -forest, -domain
  972. or -site parameters are not specified, then find all
  973. GCs in the current domain are used).
  974. {-s <Server> | -d <Domain>}
  975. -s <Server> connects to the domain controller (DC)
  976. with name <Server>. Default: local system.
  977. -d <Domain> connects to a DC in domain <Domain>.
  978. Default: a DC in the logon domain.
  979. -u <UserName> Connect as <UserName>. Default: the logged in user.
  980. -p <Password> Password for the user <UserName>. If * then prompt for
  981. password.
  982. -q Quiet mode: suppress all output to standard output.
  983. -R Recurse or follow referrals during search. Default: do
  984. not chase referrals during search.
  985. -gc Search in the Active Directory global catalog.
  986. -limit <NumObjects> Specifies the number of objects matching the given criteria
  987. to be returned, where <NumObjects> is the number of objects
  988. to be returned. If the value of <NumObjects> is 0, all
  989. matching objects are returned. If this parameter is not
  990. specified, by default the first 100 results are displayed.
  991. Remarks:
  992. The dsquery commands help you find objects in the directory that match
  993. a specified search criterion: the input to dsquery is a search criteria
  994. and the output is a list of objects matching the search. To get the
  995. properties of a specific object, use the dsget commands (dsget /?).
  996. If a value that you supply contains spaces, use quotation marks
  997. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  998. If you enter multiple values, the values must be separated by spaces
  999. (for example, a list of distinguished names).
  1000. Examples:
  1001. To find all DCs in the current domain:
  1002. dsquery server
  1003. To find all DCs in the forest and display their Relative distinguished names (RDNs):
  1004. dsquery server -o rdn -forest
  1005. To find all DCs in the site whose name is "Latin-America", and display their
  1006. names (RDNs):
  1007. dsquery server -o rdn -site Latin-America
  1008. See also:
  1009. dsquery computer /? - help for finding computers in the directory.
  1010. dsquery contact /? - help for finding contacts in the directory.
  1011. dsquery subnet /? - help for finding subnets in the directory.
  1012. dsquery group /? - help for finding groups in the directory.
  1013. dsquery ou /? - help for finding organizational units in the directory.
  1014. dsquery site /? - help for finding sites in the directory.
  1015. dsquery server /? - help for finding servers in the directory.
  1016. dsquery user /? - help for finding users in the directory.
  1017. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  1018. Directory Service command-line tools help:
  1019. dsadd /? - help for adding objects.
  1020. dsget /? - help for displaying objects.
  1021. dsmod /? - help for modifying objects.
  1022. dsmove /? - help for moving objects.
  1023. dsquery /? - help for finding objects matching search criteria.
  1024. dsrm /? - help for deleting objects.
  1025. .
  1026. MessageId=13
  1027. SymbolicName=USAGE_DSQUERY_CONTACT
  1028. Language=English
  1029. Description: Finds contacts per given criteria.
  1030. Syntax: dsquery contact
  1031. [-o {dn | rdn}]
  1032. [-startnode {forestroot | domainroot | <StartDN>}]
  1033. [-scope {subtree | onelevel | base}]
  1034. [-name <Filter>]
  1035. [-desc <Filter>]
  1036. [{-s <Server> | -d <Domain>}]
  1037. [-u <UserName>]
  1038. [-p {<Password> | *}]
  1039. [-q]
  1040. [-R]
  1041. [-gc]
  1042. [-limit <NumObjects>]
  1043. Parameters
  1044. Value Description
  1045. -o {dn | rdn} Specifies the output format.
  1046. Default: distinguished name (DN).
  1047. -startnode {forestroot | domainroot | <StartDN>}
  1048. Specifies the node where search should start:
  1049. forest root, domain root, or a node with
  1050. a DN matching <StartDN>. Default: domainroot.
  1051. -scope {subtree | onelevel | base}
  1052. Specifies the scope of the search:
  1053. subtree rooted at start node (subtree);
  1054. immediate children of start node only (onelevel);
  1055. the base object represented by start node (base).
  1056. Note that subtree and domain scope are essentially the
  1057. same for any start node unless the start node
  1058. represents a domain root. Default: subtree.
  1059. -name <Filter> Finds all contacts whose name matches the filter
  1060. given by <Filter>, e.g., "jon*" or *ith" or "j*th".
  1061. -desc <Filter> Finds contacts with descriptions matching the
  1062. value given by <Filter>, e.g., "corp*" or *branch"
  1063. or "j*th".
  1064. {-s <Server> | -d <Domain>}
  1065. -s <Server> connects to the domain controller (DC)
  1066. with name <Server>. Default: local system.
  1067. -d <Domain> connects to a DC in domain <Domain>.
  1068. Default: a DC in the logon domain.
  1069. -u <UserName> Connect as <UserName>. Default: the logged in user.
  1070. -p <Password> Password for the user <UserName>. If * then prompt for
  1071. password.
  1072. -q Quiet mode: suppress all output to standard output.
  1073. -R Recurse or follow referrals during search. Default: do
  1074. not chase referrals during search.
  1075. -gc Search in the Active Directory global catalog.
  1076. -limit <NumObjects>
  1077. Specifies the number of objects matching the given criteria
  1078. to be returned, where <NumObjects> is the number of objects
  1079. to be returned. If the value of <NumObjects> is 0, all
  1080. matching objects are returned. If this parameter is not
  1081. specified, by default the first 100 results are displayed.
  1082. Remarks:
  1083. The dsquery commands help you find objects in the directory that match
  1084. a specified search criterion: the input to dsquery is a search criteria
  1085. and the output is a list of objects matching the search. To get the
  1086. properties of a specific object, use the dsget commands (dsget /?).
  1087. If a value that you supply contains spaces, use quotation marks
  1088. around the text (for example, "CN=John Smith,CN=Users,DC=microsoft,DC=com").
  1089. If you enter multiple values, the values must be separated by spaces
  1090. (for example, a list of distinguished names).
  1091. See also:
  1092. dsquery computer /? - help for finding computers in the directory.
  1093. dsquery contact /? - help for finding contacts in the directory.
  1094. dsquery subnet /? - help for finding subnets in the directory.
  1095. dsquery group /? - help for finding groups in the directory.
  1096. dsquery ou /? - help for finding organizational units in the directory.
  1097. dsquery site /? - help for finding sites in the directory.
  1098. dsquery server /? - help for finding servers in the directory.
  1099. dsquery user /? - help for finding users in the directory.
  1100. dsquery * /? - help for finding any object in the directory by using a generic LDAP query.
  1101. Directory Service command-line tools help:
  1102. dsadd /? - help for adding objects.
  1103. dsget /? - help for displaying objects.
  1104. dsmod /? - help for modifying objects.
  1105. dsmove /? - help for moving objects.
  1106. dsquery /? - help for finding objects matching search criteria.
  1107. dsrm /? - help for deleting objects.
  1108. .
  1109.