How to change Scope of the domain operation through Powershell
Lesson: Exchange 2010 SP2
The requested search root domain.local/Users’ is not within the scope of this operation. Cannot perform searches outside the scope ‘child.domain.local’.
I have prompted with an error message, while performing a powershell operation in one of the child domain in the forest as follows:
[PS] C:\Windows\system32>Get-MailboxDatabase ‘Database Name’ -DomainController ‘Domain Controller name’ | mailbox -ActiveSyncEnabled $False The requested search root ‘Domain/Configuration/Services/Microsoft Exchange/OU/Administrative G s/Exchange Administrative Group (FYDIBOHF23SPDLT)/Databases’ is not within the scope of this operation. Cannot perf searches outside the scope ‘DOMAIN’. + CategoryInfo : NotSpecified: (0:Int32) [Set-CASMailbox], ADOperationException + FullyQualifiedErrorId : 91C2A7F9,Microsoft.Exchange.Management.RecipientTasks.SetCASMailbox
I have learned as prior doing a powershell operation in a child domain, run the following cmdlet:
Set-AdServerSettings -ViewEntireForest $True
This will set the scope of the operation through the entire forest