微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

windows-server-2008 – 为什么我不能在Powershell中导航Active Directory?

我有一个AD:驱动器,它应该允许我从Power shell中浏览活动目录.但是当我尝试使用它时,它不会让我超越根.从我所看到的,给定的命令应该工作,但它们失败了.
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=com
ForestDnsZones       domainDNS            DC=ForestDnsZones,DC=com
DomainDnsZones       domainDNS            DC=DomainDnsZones,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)
您需要使用专有名称.试试cd dc = company,dc = com.请注意,此处的选项卡完成效果很好所以尝试cd dc = comp< tab>.它应该扩展到整个DN

原文地址:https://www.jb51.cc/windows/368668.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐