I am not sure if this should be in the Exchange Forum or the Powershell forum…
I have an exchange 2010 Hybrid environment in a multi-domain forest. Whenever I need to use exchange powershell I have to change the recipient scope using the cmdlet Set-AdServerSettings -ViewEntireForest $true
What I would like to do is to have exchange Powershell Module run this automatically at startup so I created a powershell profile and added the cmdlet to a ps1 file but it loads BEFORE the exchange module is loaded so I get an error everytime.
In addition it loads whenever I start any powershell session rather than just the exchange module.
Is there a way I can get this to load in the exchange powershell session only (not non-exchange powershell) and to do so AFTER it has loaded the necessary modules.