1. Session scope: By default, the scope of your shell session is set to the Domain of the computer you're running the session on.
2. Result size: By default, shell cmdlets return 1000 results. You can modify this using the Resultsize parameter. The number of search results to return can be specified, or you can use the value unlimited to return all results.
To view the current settings for your admin session, simply type $AdminSessionADSettings.
What you get back:
ViewEntireForest : False
DefaultScope : MyDomain.com
PreferredGlobalCatalog :
ConfigurationDomainController : MyDC.MyDomain.com
PreferredDomainControllers : {}
To return recipients from the whole Forest for all recipient cmdlets used in the session, you can set the session scope by using the following command:
$AdminSessionADSettings.ViewEntireForest = $True
Note, session variables are limited to the session. Once you close the shell window, it's gone. If you start another session, you'll need to set the ViewEntireForest variable to $True again.
You may find not having to return recipients from the entire Forest for the most part. If you do not want to change your session scope to the Forest, but return all recipients in a single recipient command, you can bypass the session scope by adding the IgnoreDefaultScope switch with recipient cmdlets:Get-Mailbox -IgnoreDefaultScope -ResultSize unlimited
Other parameters such as the preferred GC, DC and config DC for the session can also be set by modifying the session variable.Labels: Administration, Exchange Server 2007, Exchange Shell
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home