Last updated on Oct 8, 2019
Connect to Exchange servers using remote PowerShell
If you do not have local access to your Exchange server, you can use Exchange remote PowerShell to connect to your Exchange Servers.
To get started open PowerShell on your local computer.
- Type the following
$UserCredential = Get-Credential

- The create the new PSSession (Change the FQDN to that of your Exchange Server)
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://EX01.ThatLazyAdmin.local/PowerShell/ -Authentication Kerberos -Credential $UserCredential

- Lastly the new PS Session needs to be imported as follows.
Import-PSSession $Session -DisableNameChecking


How to verify if it worked?
You can run the following cmdlet to get a list of mailboxes.
Get-Mailbox


I am encountering the error: ” New-PSSession : A positional parameter cannot be found that accepts argument ‘Powershell/’.” At line:1 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-PSSession], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.NewPSSessionCommand
Granted PS is not my strongest skill. What could it mean?
Hi Carlos, please use the below to connect to exchange. Hope this helps
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://EX01.ThatLazyAdmin.local/PowerShell/ -Authentication Kerberos -Credential $UserCredential
In the post, the Url is missing a “/” before PowerShell. apologies for that.