BinaryTree

Blog-Header-(2013)-FINAL-(1).jpg

   


  

Using Remote PowerShell to Provision Exchange 2010 Users

Using Remote PowerShell to Provision Exchange 2010 Users
By Robert Phillips, Senior Architect


This is a re-post from Rob's personal blog where he publishes valuable information to assist individuals and organizations who are migrating their Lotus Notes email platforms to Microsoft Exchange.


Provisioning Exchange 2010 Users with Remote Powershell in Windows XP/2003

Exchange 2010 provides us with some new PowerShell features in order to run commands remotely to a CAS server. However, there are a few prerequisites you need to know in order to do this. First of all, Windows 2003 or XP, out of the box, does not provide this feature. You'll have to download the "WINRM" update patch that installs Windows PowerShell. Here is the URL for the download:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=F002462B-C8F2-417A-92A3-287F5F81407E

Also, you need to enable remote PowerShell on your Exchange 2010 CAS server with the following PS command:

'Enable-PSRemoting'Email Migration Tip

Then choose "YES" to configure Firewall ports if necessary and then ensure that the 'WINRM' service is running on the CAS Server. There is a command to verify that you have the necessary authority to run the commands. The command is:

'get-user (username) | fl'


Then, verify that 'RemotePowerShellEnabled' is set to 'True'. To set this, enter:

‘Set-User –identity (username) –RemotePowerShellEnabled $true’

Finally, after ensuring that the Exchange server is accepting remote PS commands, you'll need to start the Windows Remote Management Service task from Services.MSC console on the Windows 2003/XP machine and then run Windows PowerShell Command from Program\Accessories:

'set-executionpolicy remotesigned'

Both the CAS Server and Windows 2003/XP machines are now configured to establish Remote Powershell sessions. In order to initiate a Remote Powershell session with the CAS Server, you need to use the Enter-PSSession cmdlet. Open a PowerShell command prompt from the Windows 2003/XP machine and enter the following:

'Enter-PSSession -ConnectionURI (http://CAS Server Hostname/powershell) -ConfigurationName Microsoft.Exchange'

Now when you type commands in the Powershell window they are executed remotely on the CAS Server. You can run any user provisioning cmdlets such as 'New-Mailbox' or 'Enable-Mailbox' from the Windows 2003/XP machine just as if you were using the CAS Server's console. 

To end the Remote Powershell session, type 'Exit-PSSession', or simply close the Powershell window.

That's it! Have fun, but be careful, this is pretty powerful.

- Rob

 
   

       

Posted on 4/15/2011 9:00:00 AM

Current rating: 4.9 (8 ratings)

Bookmark this page to:Add to Digg Add to Reddit Add to Facebook Add to Terchnorati Add to StumbleUpon Add to Delicious Add to Live Add to Twitter
Trackback URL: http://binarytree.com/trackback/34be3bc4-1c6e-49a8-9789-03bd65cf7d62/Using-Remote-PowerShell-to-Provision-Exchange-2010-Users.aspx

Comments
Blog post currently doesn't have any comments.