KB ID 0001465
Since Exchange 2013 we have been able to manage Exchange remotely through the Exchange Admin Center, but what if you want to use the Exchange Management Shell remotely?
Install Exchange Management Tools
This is not just the Management Shell, this will also install the Toolbox and additional help.
There are few prerequisites, but to install from a normal PowerShell prompt;
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementScriptingTools,IIS-ManagementScriptingTools,IIS-IIS6ManagementCompatibility,IIS-LegacySnapIn,IIS-ManagementConsole,IIS-Metabase,IIS-WebServerManagementTools,IIS-WebServerRole ./Setup.exe /Role:ManagementTools /IAcceptExchangeServerLicenseTerms
Once Installed, You can launch the Shell itself, or you can add the Exchange PowerShell commandlets to a normal Powershell session, with the following command;
For older versions of Exchange, the commands are slightly different;
- Exchange 2010: Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010;
- Exchange 2007 :Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin;
Connect to Exchange Remotely (via PowerShell)
It’s a Windows server after all, so you can bring up a remote session, first give it an account with some Exchange administrative privileges;
$UserCredential = Get-Credential
Then connect the the Exchange Server;
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://Server-Name/PowerShell/ -Authentication Kerberos -Credential $UserCredential Import-PSSession $Session -DisableNameChecking
Note: As above, don’t forget to disconnect the session the you have finished.
Related Articles, References, Credits, or External Links