{"id":4008,"date":"2013-03-18T00:01:00","date_gmt":"2013-03-18T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2013\/03\/18\/playing-with-the-ad-drive-for-fun-and-profit\/"},"modified":"2013-03-18T00:01:00","modified_gmt":"2013-03-18T00:01:00","slug":"playing-with-the-ad-drive-for-fun-and-profit","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/playing-with-the-ad-drive-for-fun-and-profit\/","title":{"rendered":"Playing with the AD: Drive for Fun and Profit"},"content":{"rendered":"<p><strong style=\"font-size: 12px\">Summary<\/strong><span style=\"font-size: 12px\">: Microsoft Scripting Guy, Ed Wilson, talks about using the AD: drive to explore Active Directory Domain Services.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\" \/>&nbsp;Hey, Scripting Guy! I will confess that I love using the Active Directory module for Windows PowerShell. I love the way I can use Windows PowerShell to create new users or to easily search for and find users and other stuff. What I do not get is the drive that the Active Directory module creates. I mean, what good is it? Every time I try to change to my domain &ldquo;folder,&rdquo; all I get is an error. I guess that it is used under the covers for something, but it seems a shame that I cannot use it too. Not sure if there is a question here other than, &ldquo;Can I actually use the AD: drive?&rdquo; If the answer here is, &ldquo;Yes,&rdquo; I need a follow up question, &ldquo;How?&rdquo; Thanks for listening and for all the good work you do.<\/p>\n<p>&mdash;RR<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\" \/>&nbsp;Hello RR,<\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. This morning I am sipping a cup of English Breakfast tea and listening to <a href=\"http:\/\/en.wikipedia.org\/wiki\/ABBA\" target=\"_blank\">Abba<\/a>. I was looking at some of the pictures Teresa and I took while we were in Stockholm, and for some reason Abba songs kept coming to my mind. When this happens, it seems that all I can do to extinguish the tune is to flood it. I am also thinking about, &ldquo;I am your Scripting King&hellip;&rdquo; Hmm&hellip;<\/p>\n<h2>Understanding the AD: drive<\/h2>\n<p>You get the Active Directory module as part of the <a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=28972\" target=\"_blank\">Remote Server Administration Tools for Windows 8<\/a>. One of the cool features in Windows PowerShell 3.0 is when I use a cmdlet, Windows PowerShell automatically loads the module that contains the cmdlet if it is not already present. Autoloading is great.<\/p>\n<p>Therefore, when I use <strong>Get-ADComputer<\/strong>, Windows PowerShell automatically loads the Active Directory module. However, if the Active Directory module is not already loaded, attempting to set my working location to the AD: drive generates an error. This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; sl ad:<\/p>\n<p style=\"padding-left: 30px\">sl : Cannot find drive. A drive with the name &#8216;ad&#8217; does not exist.<\/p>\n<p>At line:1 char:1<\/p>\n<p style=\"padding-left: 30px\">+ sl ad:<\/p>\n<p style=\"padding-left: 30px\">+ ~~~~~~<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ObjectNotFound: (ad:String) [Set-Location], DriveNotFoundException<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp; + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand<\/p>\n<h2>Load the Active Directory module to use the drive<\/h2>\n<p>After you import the Active Directory module, the AD: drive becomes available. I can then set my working location to the AD: drive. I can also use <strong>Get-ChildItem<\/strong> to retrieve the contents. This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; sl ad:<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\&gt; dir<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectClass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DistinguishedName<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p style=\"padding-left: 30px\">iammred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domainDNS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">Configuration&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configuration&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=Configuration,DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">Schema&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dMD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=Schema,CN=Configuration,DC=iammred,D..<\/p>\n<p style=\"padding-left: 30px\">DomainDnsZones&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domainDNS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DC=DomainDnsZones,DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">ForestDnsZones&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;domainDNS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DC=ForestDnsZones,DC=iammred,DC=net<\/p>\n<p>Unfortunately, what I see on the AD: drive is not what you need to use to actually interact with the drive. This leads to confusion. Therefore, when I attempt to set my location to the <em>iammred<\/em> container, an error arises. This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\&gt; sl iammred<\/p>\n<p style=\"padding-left: 30px\">sl : Cannot find path &#8216;AD:\\iammred&#8217; because it does not exist.<\/p>\n<p style=\"padding-left: 30px\">At line:1 char:1<\/p>\n<p style=\"padding-left: 30px\">+ sl iammred<\/p>\n<p style=\"padding-left: 30px\">+ ~~~~~~~~~~<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ObjectNotFound: (AD:\\iammred:String) [Set-Location],ItemNotFoundException<\/p>\n<p style=\"padding-left: 30px\">&nbsp;&nbsp;&nbsp; + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand<\/p>\n<p>The error is a bit misleading because obviously <em>iammred <\/em>does exist. I can prove that it exists by piping the object to the <strong>Where-Object<\/strong> as shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\&gt; dir | ? name -eq &#8216;iammred&#8217;<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectClass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DistinguishedName<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p style=\"padding-left: 30px\">iammred&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; domainDNS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DC=iammred,DC=net<\/p>\n<p>I use the up arrow, and send the output to the <strong>Format-List<\/strong> cmdlet to view all of the information in my search for a hint. The output from the command is shown here.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4010.hsg-3-18-13-01.png\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4010.hsg-3-18-13-01.png\" alt=\"Image of command output\" \/><\/a><\/p>\n<h2>Change my working location to the domain<\/h2>\n<p>I decide to use the <strong>Set-Location<\/strong> cmdlet to change my working location to the actual domain. To do this, I specify the <strong>DistinguishedName<\/strong><em> <\/em>attribute. Because the components of the name separate via commas, I place the string in quotation marks. When I have my working location on the domain drive, I use the <strong>Get-ChildItem<\/strong> cmdlet to produce an output. These commands are shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\&gt; sl &#8220;dc=iammred,dc=net&#8221;<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\dc=iammred,dc=net&gt; dir<\/p>\n<p>The commands and the output associated with the commands are represented in the image that follows.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6204.hsg-3-18-13-02.png\"><img decoding=\"async\" title=\"Image of command output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6204.hsg-3-18-13-02.png\" alt=\"Image of command output\" \/><\/a><\/p>\n<p>To change location to the child containers, the first portion of the distinguished name is required. Therefore attempting to set the location to the <strong>Users<\/strong> container fails when attempted as follows.<\/p>\n<p style=\"padding-left: 30px\">sl users<\/p>\n<p>It also fails when I attempt to connect to <strong>OU=Users<\/strong> as seen here. This is understandable because <strong>Users<\/strong><em> <\/em>is a container and not an organizational unit (OU).<\/p>\n<p style=\"padding-left: 30px\">sl &#8220;ou=users&#8221;<\/p>\n<p>When I use <strong>Set-Location<\/strong> to change the working location to <strong>cn=users<\/strong><em>, <\/em>does the command work? This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\dc=iammred,dc=net&gt; sl &#8220;cn=users&#8221;<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\cn=users,dc=iammred,dc=net&gt;<\/p>\n<p>I can use the <strong>.. <\/strong>shortcut to move up a level in the hierarchy as shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\cn=users,dc=iammred,dc=net&gt; sl ..<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\dc=iammred,dc=net&gt; dir<\/p>\n<p>I use the same technique to change to the Charlotte OU. This command is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\dc=iammred,dc=net&gt; sl &#8220;ou=charlotte&#8221;<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\ou=charlotte,dc=iammred,dc=net&gt;<\/p>\n<p>To move to the root of the C: drive from the AD: drive, use the <strong>Set-Location<\/strong> cmdlet and specify the C: drive. This technique is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\ou=charlotte,dc=iammred,dc=net&gt; sl c:\\<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt;<\/p>\n<p>From the root of the C: drive, to go back to the Charlotte OU, I use the full path as shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; sl &#8220;AD:\\ou=charlotte,dc=iammred,dc=net&#8221;<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\ou=charlotte,dc=iammred,dc=net&gt;<\/p>\n<p>When I navigate, I like to use <strong>Push<\/strong> and <strong>Pop<\/strong>. So, from the Charlotte OU, I use the <strong>Push-Location<\/strong> cmdlet to store the path to my current location, and then I change to the C: drive This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\ou=charlotte,dc=iammred,dc=net&gt; push-location<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\ou=charlotte,dc=iammred,dc=net&gt; sl c:<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt;<\/p>\n<p>Next, I use <strong>Pop-Location<\/strong> to return me to the Charlotte OU. This technique is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; Pop-Location<\/p>\n<p style=\"padding-left: 30px\">PS AD:\\ou=charlotte,dc=iammred,dc=net&gt;<\/p>\n<h2>Create a new Windows PowerShell drive for a favorite OU<\/h2>\n<p>If I find myself spending a lot of time in the Charlotte OU, I do not want to deal with a lot of typing to change to the OU. So I can create a new Windows PowerShell Drive only for Charlotte. First, I need to know the name of the provider. I get this by using the <strong>Get-PSProvider<\/strong> cmdlet. This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; Get-PSProvider<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Capabilities&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Drives<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;<\/p>\n<p style=\"padding-left: 30px\">Alias&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShouldProcess&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {Alias}<\/p>\n<p style=\"padding-left: 30px\">Environment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShouldProcess&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {Env}<\/p>\n<p style=\"padding-left: 30px\">FileSystem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Filter, ShouldProcess, Crede&#8230; {C, D, E}<\/p>\n<p style=\"padding-left: 30px\">Function&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShouldProcess&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {Function}<\/p>\n<p style=\"padding-left: 30px\">Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShouldProcess, Transactions&nbsp;&nbsp;&nbsp;&nbsp; {HKLM, HKCU, HKCR}<\/p>\n<p style=\"padding-left: 30px\">Variable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShouldProcess&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {Variable}<\/p>\n<p style=\"padding-left: 30px\">ActiveDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Include, Exclude, Filter, Sh&#8230; {AD}<\/p>\n<p>It is as I suspected. Now I create my new Windows PowerShell drive by using the <strong>New-PSDrive<\/strong> cmdlet. The only thing that is tricky is the value for <strong>Root<\/strong><em>. <\/em>I copied the string that I used earlier with <strong>Set-Location<\/strong>, and it worked perfectly here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; New-PSDrive -Name Charlotte -PSProvider ActiveDirectory -Root &#8220;AD:\\ou=charlot<\/p>\n<p style=\"padding-left: 30px\">te,dc=iammred,dc=net&#8221;<\/p>\n<p style=\"padding-left: 30px\">&nbsp;<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Used (GB)&nbsp;&nbsp;&nbsp;&nbsp; Free (GB) Provider&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Root<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212; &#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;-<\/p>\n<p style=\"padding-left: 30px\">Charlotte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ActiveDire&#8230; \/\/RootDSE\/ou=charlotte,dc=ia&#8230;<\/p>\n<p>Remember, I now have a Windows PowerShell drive, so I need the colon at the end of the drive name to navigate there. This is shown here.<\/p>\n<p style=\"padding-left: 30px\">PS C:\\&gt; sl charlotte:<\/p>\n<p style=\"padding-left: 30px\">PS Charlotte:\\&gt;<\/p>\n<p>When I am on the drive, I can use standard cmdlets to work with the data. Here I use <strong>dir<\/strong><em> <\/em>(alias for <strong>Get-ChildItem<\/strong>) to obtain a list of all members of the Charlotte OU.<\/p>\n<p style=\"padding-left: 30px\">PS Charlotte:\\&gt; dir<\/p>\n<p style=\"padding-left: 30px\">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectClass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DistinguishedName<\/p>\n<p style=\"padding-left: 30px\">&#8212;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p style=\"padding-left: 30px\">ED-PC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; computer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=ED-PC,OU=Charlotte,DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">ed wilson&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=ed wilson,OU=Charlotte,DC=iammred,DC&#8230;<\/p>\n<p style=\"padding-left: 30px\">EDLT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; computer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=EDLT,OU=Charlotte,DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">HYPERV2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; computer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=HYPERV2,OU=Charlotte,DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">Regular User&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=Regular User,OU=Charlotte,DC=iammred&#8230;<\/p>\n<p style=\"padding-left: 30px\">Sample User&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=Sample User,OU=Charlotte,DC=iammred,&#8230;<\/p>\n<p style=\"padding-left: 30px\">SQL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=SQL,OU=Charlotte,DC=iammred,DC=net<\/p>\n<p style=\"padding-left: 30px\">Teresa Wilson&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CN=Teresa Wilson,OU=Charlotte,DC=iammre&#8230;<\/p>\n<p>RR, that is all there is to using the AD: drive. Active Directory Week will continue tomorrow when I will talk about searching Active Directory by using the AD: drive.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><strong>Ed Wilson, Microsoft Scripting Guy<\/strong>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the AD: drive to explore Active Directory Domain Services. &nbsp;Hey, Scripting Guy! I will confess that I love using the Active Directory module for Windows PowerShell. I love the way I can use Windows PowerShell to create new users or to easily search for and find [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[7,3,4,8,45],"class_list":["post-4008","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-active-directory","tag-scripting-guy","tag-scripting-techniques","tag-searching-active-directory","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about using the AD: drive to explore Active Directory Domain Services. &nbsp;Hey, Scripting Guy! I will confess that I love using the Active Directory module for Windows PowerShell. I love the way I can use Windows PowerShell to create new users or to easily search for and find [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=4008"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4008\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=4008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=4008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=4008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}