{"id":114,"date":"2009-08-07T14:51:11","date_gmt":"2009-08-07T19:51:11","guid":{"rendered":"http:\/\/s222061487.onlinehome.us\/GeekyThingz\/?p=114"},"modified":"2009-08-07T14:51:11","modified_gmt":"2009-08-07T19:51:11","slug":"using-dsquery-and-dsget-commands","status":"publish","type":"post","link":"https:\/\/www.geekythings.me\/?p=114","title":{"rendered":"Using Dsquery and Dsget commands"},"content":{"rendered":"<p>I thought that I would fill this blog with other things that I find useful in my admin work as well. \u00a0The DSQuery and DSGet commands are really useful tools in my arsenal.\u00a0These commands are great for finding AD objects and their details.<\/p>\n<p>Quite simply, The DSQuery command \u00a0finds AD objects and DSGet command \u00a0gets more details about an AD object.To find a user in active directory:<\/p>\n<p>Dsquery user \u00a0-name (username or partial name with wildcards)<\/p>\n<p>For example:<\/p>\n<p>The result of \u00a0the command:<\/p>\n<p>dsquery user -name dwayne*<\/p>\n<p>Will display the following:<\/p>\n<p>&#8220;CN=Dwayne La Rose,OU=Tech,OU=Some other OU,DC=SomeDomain,DC=com&#8221;<\/p>\n<p>You can then pipe that dquery command into a DSGet command to get more details about objects.<\/p>\n<p>Command:<\/p>\n<p>dsquery user -name dwayne*|dsget user -display -email -tel<\/p>\n<p>Results:<\/p>\n<p>Dispaly \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Tel\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 email<\/p>\n<p>Dwayne La Rose \u00a0 \u00a0 \u00a0 (555)555-5555 \u00a0 \u00a0Dwayne.LaRose@domain.com<\/p>\n<p>This command can be used for computers, \u00a0groups, OU&#8217;s and other AD objects.<\/p>\n<p>For more detail on these commands go to http:\/\/technet.microsoft.com\/en-us\/library\/cc732952(WS.10).aspx<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I thought that I would fill this blog with other things that I find useful in my admin work as well. \u00a0The DSQuery and DSGet commands are really useful tools in my arsenal.\u00a0These commands are great for finding AD objects &hellip; <a href=\"https:\/\/www.geekythings.me\/?p=114\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-admin-stuff"],"_links":{"self":[{"href":"https:\/\/www.geekythings.me\/index.php?rest_route=\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geekythings.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geekythings.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geekythings.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geekythings.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=114"}],"version-history":[{"count":2,"href":"https:\/\/www.geekythings.me\/index.php?rest_route=\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":116,"href":"https:\/\/www.geekythings.me\/index.php?rest_route=\/wp\/v2\/posts\/114\/revisions\/116"}],"wp:attachment":[{"href":"https:\/\/www.geekythings.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geekythings.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geekythings.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}