none
Remote Powershell calls to Exchange Server 2007 RRS feed

  • Question

  • I've written a C# sample to invoke Exchange server command from a remote box using powershell 2.0. I was able to retrieve response to the command.

    However when I do the same command for exchange server 2007, I am observing HTTP connection error.

    Can someone tell me why is it that I am unable to execute command remotely for Exchange Server 2007.

     

    --Prasad

    Thursday, January 20, 2011 7:35 PM

All replies

  •  

    The  remote powerShell cmdlets   features that where added in Exchange 2010 and cannot be used on Exchange 2007. With Exchange 2007 you need to run your code from a machine a that has the Exchange 2007 Management Tools installed then you can invoke the cmdlet locally on that machine.

    I am sure that remote  command wont suported for Exchange Server 2007. only Exchange server2010.

    By

    A Path finder

    JO Swa..

    Monday, January 24, 2011 1:25 PM
  • The bigger question is can you get the commands to work from a native powershell window.

    I always try from powershell first, then make the code work in C# or C++ clr

    Setup:

    1. make sure powershell version 2 is running everywhere.

    Then start powershell and enter.

    1. $creddn=get-credential mydomainID\mydomainUser

    - it will prompt for a password.

    2. enter-pssession serverName -cred $creddn

    Prompt should now change to your destination machine.  If this fails, then follow the setup of about_remote_troubleshooting at:

    http://technet.microsoft.com/en-us/library/dd347642.aspx

    3. add the ps snapin for exchange via:

    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

    4. try a simple command first:

    get-host

    Name             : ServerRemoteHost
    Version          : 1.0.0.0
    InstanceId       : af1a658b-233a-4a68-b1cc-44c6e01743f9
    UI               : System.Management.Automation.Internal.Host.InternalHostUserI
                       nterface
    CurrentCulture   : en-US
    CurrentUICulture : en-US
    PrivateData      :
    IsRunspacePushed :
    Runspace         :

     

    Now try an exchange command:

    5. get-exchangeserver

    THIS IS WHERE I DIE WITH the following:

    Processing data for a remote command failed with the following error message: T
    he WSMan provider host process did not return a proper response.  A provider in
     the host process may have behaved improperly. For more information, see the ab
    out_Remote_Troubleshooting Help topic.
        + CategoryInfo          : ResourceUnavailable: (:) [], ParentContainsError
       RecordException
        + FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemoting
       DataStructureException

     

    Friday, February 11, 2011 7:03 PM
  • Hi,

    Have a look @ peerfect.blogspot.com

    Maeffy

    Monday, February 21, 2011 10:40 AM