0

I have an Exchange environment with two servers - both are Exchange 2007 sp3.

Now I need to use remote PowerShell to pull some data from the servers.

How do I connect remote powershell from a client system to the Exchange server that is running Exchange 2007 sp3?

2

Invoke-Command: http://technet.microsoft.com/en-us/library/hh849719.aspx

From the help:

The Invoke-Command cmdlet runs commands on a local or remote computer and returns all output from the commands,
        including errors. With a single Invoke-Command command, you can run commands on multiple computers.

        To run a single command on a remote computer, use the ComputerName parameter. To run a series of related commands
        that share data, use the New-PSSession cmdlet to create a PSSession (a persistent connection) on the remote
        computer, and then use the Session parameter of Invoke-Command to run the command in the PSSession. To run a
        command in a disconnected session, use the InDisconnectedSession parameter. To run a command in a background job,
        use the AsJob parameter.

        You can also use Invoke-Command on a local computer to evaluate or run a string in a script block as a command.
        Windows PowerShell converts the script block to a command and runs the command immediately in the current scope,
        instead of just echoing the string at the command line.

        To start an interactive session with a remote computer, use the Enter-PSSession cmdlet. To establish a persistent
        connection to a remote computer, use the New-PSSession cmdlet.

        Before using Invoke-Command to run commands on a remote computer, read about_Remote
        (http://go.microsoft.com/fwlink/?LinkID=135182).
| improve this answer | |
  • Can I use this to connect to Exchange 2007 sp3? And canb I use this command in Powershell v2.0? – Giridharan J Nov 21 '14 at 6:24
  • Yes to both questions. – Davidw Nov 21 '14 at 16:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.