-
Connect-ExchangeServer PowerShell Function
Posted on November 5th, 2010 4 commentsWhen working with Exchange 2010 it is possible to remotely connect with PowerShell to an Exchange 2010 server without having the Exchange Management tools installed on your local workstation. This is a feature known as implicit remoting. The technique to connect is very straightforward, but to make it not necessary to have to remember the commands I wrapped them up into a function Connect-ExchangeServer which I then stored in my PowerShell profile.
function Connect-ExchangeServer { param( $ExchangeServer ) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://$ExchangeServer/PowerShell/ -Authentication Kerberos Import-PSSession $Session }Happy Remoting!
2 responses to “Connect-ExchangeServer PowerShell Function”

-
Hey Jonathan,
Great podcast.
So if I put this in my profile as is how would I connect.
>connect-exchangeserver %servername% ????
do I need to modify the script?
2 Trackbacks / Pingbacks
-
[...] Jonathan Medd posted a Connect-ExchangeServer PowerShell Function [...]
-
[...] http://www.jonathanmedd.net/2010/11/connect-exchangeserver-powershell-function.html [...]
Leave a reply
-










Chris November 16th, 2010 at 21:42