Remote Powershell (Windows Powershell v2) allows you to connect to an Exchange 2010 organization from a client without having the 2010 management tools installed. You should install Windows Management Framework, which includes Powershell V2 and Windows Remote Management on the client. Download it here. Make sure that you select the correct version (x86 or X64) depending on the client you use.
The clients should be either Vista SP1+ or Windows 2008 SP1+ (x86 or x64). Uninstall any previous versions of Management Framework, if you have it. Instructions are here.
In order to connect to an Exchange 2010 organization from a client with windows management framework installed and no 2010 management tools, we need to follow certain steps.
- Store the login details of an account that has permissions to remote in. By default, the account that was used to install Exchange 2010 will have the permissions already.
- If you want another user to be able to initiate a remote powershell session, run Set-User –identity username –RemotePowershellEnabled $True
- Store the session details in a variable
- Import the session defined. It will take a while.
- Run exchange cmdlets / administer the 2010 environment.
- Once you have finished your work, remove the session.
Let’s get to business. Once the framework is installed, launch Windows Powershell V2
Run $user = Get-Credential to store the login account details. A login box gets prompted, fill in the details and click OK. The account details are now in the variable “user”.
Run $session = New-PSSession -Configurationname Microsoft.Exchange –ConnectionUri http://hew-dc/powershell -Credential $user
This stores the session details including the account used for remoting.
Run Import-PSSession $session to import the server-side powershell session to the client side one.
It takes some time to import the exchange cmdlets. Once it is completed, you can use all exchange cmdlets in your Windows Powershell session.
Run Remove-PSSession $session once you have completed your work.
That’s it for now!