交换 powershell :获取默认范围之外的邮箱
如何在当前域的当前默认范围之外运行 cmdlet“get-mailbox”?
当我运行 get-mailbox -OrganizationalUnit bob.com/bobsage 时 我收到一条错误消息: 获取邮箱:请求的搜索根“rss.com/rsstoilet”不在当前默认范围“ens.com”中。 无法在当前默认范围之外执行搜索。
提前致谢
how do you run the cmdlet "get-mailbox" outside the current default scope of the current domain?
When I run get-mailbox -OrganizationalUnit bob.com/bobsage
I get an error message saying:
Get-mailbox: The requested search root 'rss.com/rsstoilet' is not in the current default scope 'ens.com'. Cannot perform searches outside the current default scope.
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试设置此全局变量:
$AdminSessionADSettings.ViewEntireForest = $True
或使用
Set-ADServerSettings -ViewEntireForest $True
或在 cmdlet 级别设置:
Get-邮箱-IgnoreDefaultScope
Try to set this global variable:
$AdminSessionADSettings.ViewEntireForest = $True
Or use
Set-ADServerSettings -ViewEntireForest $True
Or set it on a cmdlet level:
Get-Mailbox -IgnoreDefaultScope
我非常确定错误消息是准确的 - 它无法在当前默认范围之外执行搜索。 您需要更改运行命令的范围。
I'm pretty sure the error message is accurate - it cannot perform searches outside the current default scope. You would need to change the scope you're running the command in.
如果使用第二个选项 (-ignoredefaultscope),请确保将对象的 DN 作为参数传递给 -Identity。
例如: Get-Mailbox -IgnoreDefaultScope -Identity "cn=用户名,ou=ouname,dc=域名,dc=com"
谢谢,
西塔拉姆·帕玛蒂
www.techibee.com
If you use the second option(-ignoredefaultscope), make sure to pass the DN of the object as a parameter to -Identity.
ex: Get-Mailbox -IgnoreDefaultScope -Identity "cn=username,ou=ouname,dc=domainname,dc=com"
Thanks,
Sitaram Pamarthi
www.techibee.com