How to change default search scope in Exchange 2007
While executing commands like Get-Mailbox, you often receive errors like identify is not found in default search scope. This you will see in a multi domain environment in general. In such cases, either you need to make the environment to look in whole forest for objects or ask powershell/cmdlet to ignore the scope.Here are the two ways I am talking about…
Set the search scope to forest level :- to do this, execute the below command
$AdminSessionADSettings.ViewEntireForest = $trueMake cmdlet to ignore the scope:- to do this, pass -ignoredefaultscope argument to cmdlet
Get-Mailbox -IgnoreDefaultScope -Identity “cn=username,ou=ouname,dc=domainname,dc=com”Note that, incase of ignore default scope, you should parse only DN to -identity parameter.
No comments:
Post a Comment