Remote management of Exchange 2010 using PowerShell

You can run powershell commands on your Exchange 2010 server from machines whether or not they have the Exchange Management Tools installed using implicit remoting.

Even when you run the Exchange Management Shell on your exchange server, you\’re essentially creating a powershell remoting session. The following steps take place in the background when you click the EMS icon:

  • Load the Microsoft.Exchange.Management.PowerShell.E2010 snap-in gets loaded
  • The RemoteExchange.ps1 script is dot sourced
  • The Connect-ExchangeServer function is executed
  • You can set up implicit remoting from any maching using powershell v2. This imports the commands from your exchange server to your local powershell session so you don\’t need any Exchange tools installed.

    First we create a session using the New-PSSession cmdlet:

    $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<CAS FQDN>/PowerShell/ -Authentication Kerberos

    Then, import the session using the Import-PSSession cmdlet:

    Import-PSSession $s

    The Exchange Management Shell commands are now imported into the local PowerShell session.

    You could use the same method to setup a scheduled task from your machine to run a commands on your exchange server.

    [source: ]

    Comments

    No comments yet. Why don’t you start the discussion?

    Leave a Reply

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