Search scope in Powershell while working with Exchange 2010/2013

You can expect the following errors while running Get-MailBox, New-MoveRequest and many other commanlets in Powershell in EMS (Exchange Management Shell):

The requested search root domain is different from the scope root domain.

or

The requested search root domain.local/Users’ is not within the scope of this operation. Cannot perform searches outside the scope ‘child.domain.local’.

 

This is because you have Exchange servers installed in some Root domain and the users are located in child domains. To workaround these issues, you can set parameter for your current Powershell session:

 

Set-AdServerSettings -ViewEntireForest $True

... or you can use -IgnoreDefaultScope switch for commandlets that support this switch.

 

The preferable option is the first one.

 

Tags: active directory (ru), powershell (ru), exchange 2013 (ru), exchange 2010 (ru)

PrintEmail

Add comment


Security code
Refresh