exchange powershell:在默认范围之外的get-mailbox
-
03-07-2019 - |
题
如何运行cmdlet" get-mailbox"在当前域的当前默认范围之外?
当我运行get-mailbox -OrganizationalUnit bob.com/bobsage时 我收到一条错误消息: 获取邮箱:请求的搜索根“rss.com/rsstoilet”不在当前默认范围“ens.com”中。无法在当前默认范围之外执行搜索。
提前致谢
解决方案
尝试设置此全局变量:
$ AdminSessionADSettings.ViewEntireForest = $ True
或使用 Set-ADServerSettings -ViewEntireForest $ True
或者将其设置为cmdlet级别:
Get-Mailbox -IgnoreDefaultScope
其他提示
我非常确定错误消息是准确的 - 无法执行当前默认范围之外的搜索。您需要更改运行命令的范围。
如果使用第二个选项(-ignoredefaultscope),请确保将对象的DN作为参数传递给-Identity。
例如:Get-Mailbox -IgnoreDefaultScope -Identity" cn = username,ou = ouname,dc = domainname,dc = com"
谢谢, Sitaram Pamarthi
不隶属于 StackOverflow