Saturday , April 20 2024
Home - Don't Forget! - How to invoke/test Exchange 2010 cmdlets via Remote Powershell 2.0 window

How to invoke/test Exchange 2010 cmdlets via Remote Powershell 2.0 window

I’ve been working on a issue with WinRM and thought I would share the steps to test WinRM is working correctly.  This results in the Exchange 2010 Cmdlets being available on a Powershell 2.0 window without Exchange Management tools being installed.  Note: you must be have Exchange admin role assigned to the current logged in user i.e. can not be used to beat security model.

Start a Powershell Window as Administrator and type:

$session = New-PSSession -ConfigurationName Microsoft.exchange -ConnectionUri http://ExchangeCASServer.domain.local/PowerShell/ -Authentication Kerberos

Note: Change ‘ExchangeCASServer.domain.local’ to be the Exchange 2010 CAS server you want to connect to or test.

 

You need to then import new Exchange cmdlet session into the current powershell window.  The following command with link the Exchange 2010 commands into the current Powershell window:

Import-PSSession $session

You should see no red errors shown on the screen.  If you do you will have to troubleshot the error shown.

 

If all being well the following command with ask for the Exchange organisation configuration settings.  This a Exchange command using the Remote Powershell system.

Get-OrganizationConfig

 

You should now have the Exchange information show in the powershell window.  This process also allows the Exchange Admin to use any Powershell 2.0 window to perform Exchange admin tasks.

Check Also

The pain of TLS 1.2 with PowerShell module for Azure Active Directory (MSOnline)

Building labs in a hurry sometimes can bite you with recent changes in Office 365 …

Leave a Reply

Your email address will not be published. Required fields are marked *