Remotely Connecting to Exchange Via Powershell


Want to manage exchange from the command line but don't want to install the tools or RDP into servers.  Follow these steps and assuming your virtual directories are jacked up you should be able to connect from any powershell window.



Run $creds = Get-Credential







Enter your exchange admin credentials in the pop up box.


















Run $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri <webmail URL>/PowerShell -Credential $creds






Run Import-PSSession $session







It should now start importing the cmdlets to a temporary location on your machine.







Once that's completed your done.  You can now managed exchange.  Depending on what sort of firewall\load balancing you have going on, this will also work from outside the company.  You might also think about just copying the commands into a .ps1 file.  That will turn it into a script and you can just run the script to connect.

As with anything you find on the internet use this at your own risk.  Just because it worked for me doesn't mean it will work for you.

Comments

Popular posts from this blog

Local Administrator Password Solution(LAPS)

Error Connecting to Hyper-V Host

MBAM Not BitLocking