Why can't I navigate Active Directory within Powershell?

Posted by Myrddin Emrys on Server Fault See other posts from Server Fault or by Myrddin Emrys
Published on 2012-04-16T21:22:57Z Indexed on 2012/09/18 3:40 UTC
Read the original article Hit count: 587

I have an AD: drive, which should allow me to browse active directory from within Powershell. But when I try to use it, it will not let me navigate beyond the root. From what I have read the given commands should work, but they are failing.

PS AD:\> ls

Name                 ObjectClass          DistinguishedName
----                 -----------          -----------------
company              domainDNS            DC=company,DC=com
Configuration        configuration        CN=Configuration,DC=company,DC=com
Schema               dMD                  CN=Schema,CN=Configuration,DC=company,DC=com
ForestDnsZones       domainDNS            DC=ForestDnsZones,DC=company,DC=com
DomainDnsZones       domainDNS            DC=DomainDnsZones,DC=company,DC=com

PS AD:\> cd schema
Set-Location : Cannot find path 'AD:\schema' because it does not exist.
At line:1 char:3
+ cd <<<<  schema
    + CategoryInfo          : ObjectNotFound: (AD:\schema:String) [Set-Location], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

PS AD:\> cd Schema
Set-Location : Cannot find path 'AD:\Schema' because it does not exist.
(duplicate of previous error)

PS AD:\> cd company
Set-Location : Cannot find path 'AD:\company' because it does not exist.
(duplicate of previous error)

PS AD:\> ls Schema
Get-ChildItem : Cannot find path '//RootDSE/Schema' because it does not exist.
(duplicate of previous error)

PS AD:\> cd ForestDnsZones
Set-Location : Cannot find path 'AD:\ForestDnsZones' because it does not exist.
(duplicate of previous error)

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about active-directory