Powershell: Connect to Exchange server powershell
- by marc dekeyser
Connecting to Exchange powershell is, for normal operations, as simple as opening the shortcut on you start menu :).However, if you have the need to have some scripts perform actions against your Exchange you can use the below code to make that happen!$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://YourCASServerFQDN/PowerShell/ -Authentication Kerberos
Import-PSSession $s
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1
Connect-ExchangeServer -auto