Exchange Management Shell Default Exchange Server
-
25-05-2021 - |
質問
My question is whether or not there is a way to specify the default Exchange Server Connection in ExchangeShell and how I could configure such. Currently ExchangeShell attempts to connect to the nearest server.
解決
If you check the properties of the EMS icon, it should show a command line of:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto
Change that Connect-ExchangeServer -auto to:
Connect-ExchangeServer -ServerFQDN "servername.domain.com"
他のヒント
You can change it in the EMS shortcut. At the end of the Target box you'll find this:
... ;Connect-ExchangeServer -auto
Replace '-auto' with your Server name.
... ;Connect-ExchangeServer ServerFqdn
The Connect-ExchangeServer
function is defined in the $exbin\ConnectFunctions.ps1 which is loaded by startup script defined in the EMS shortcut (RemoteExchange.ps1)