Zach Butler’s Blog

Just another IT Management weblog

Remote Powershell Connection to Exchange 2010

leave a comment »

A user must be enabled for a Remote Shell before they can use it.
Set-User David -RemotePowerShellEnabled $True
 
Open Remote Exchange Management Shell
————————————————————–
To connect as currently logged on user
Set-ExecutionPolicy Unrestricted
 
$EMS = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://van-ex1.adatum.com/powershell/ -Authentication Kerberos
Import-PSSession $EMS
 
————————————————————–
To connect as different User Account
Set-ExecutionPolicy Unrestricted
$UserCredential = Get-Credential
 
$EMS = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://van-ex1.adatum.com/powershell -Authentication Kerberos -Credential $UserCredential
 
Import-PSSession $EMS
————————————————————–
 
To Disconnect from the Remote Powershell Console correctly
Remove-PSSession $EMS
 
Failure to disconnect will result in the session needing to timeout before the connection is released. By default, Exchange allows 18 concurrent powershell connections
Use Get-ThrottlingPolicy or Set-ThrottlingPolicy to view or change these defaults.
 
 
Advertisements

Written by Zach Butler

February 23, 2010 at 9:38 pm

Posted in Exchange 2010

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: