none
Exchange powershell command to managing remote forest Exchange setup

    Question

  • Hi,

    We have some custom requirement where we are looking for Exchange 2007/2010 powershell command/admin console to manage the Exchange setup which is installed in different forest.

    Ex: I have a work station in Domain A and wanted manage the exchange setup which is in Domain B and all together its a different forest and exchange setup in different forest.

    Do we have some solution like AD Trust relationship etc ? to manage the remote forest Exchange setup ?

    Pls guide me and let me know if any more details required.


    Regards:Mahesh

    Wednesday, June 13, 2012 9:25 AM

All replies

  • $UserCredential = Get-Credential
    
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<FQDN of Exchange 2010 server>/PowerShell/ -Authentication Kerberos -Credential $UserCredential
    
    
    Import-PSSession $Session
    Connect Remote Exchange Management Shell to an Exchange Server


    Mike Crowley | MVP
    My Blog -- Planet Technologies

    Wednesday, June 13, 2012 1:31 PM
  • Hi Mike,

    Thanks for your revert and will check this option really...

    Does this work for Exchange 2007 as well ?


    Regards:Mahesh

    Wednesday, June 13, 2012 1:44 PM
  • Hi
       According to recent post, it doesn't work for exchange 2007.
       The problem is, exchange 2007 did not install the PowerShell virtual directory in IIS.
       There will be no IIS virtual directory for powershell if you are working with Exchange 2007.
       Instead the url looks like http(s)://machine:[5985|5986]/wsman.
       But user still meets other problems.
       You can read this case about it.
       http://social.technet.microsoft.com/Forums/en/exchangesvrgeneral/thread/4596035a-cede-4541-8b8e-e2e9bf1b40dc
     
      TechNet Subscriber Support in forum
      If you have any feedback on our support, please contact tngfb@microsoft.com

    Terence Yu

    TechNet Community Support


    • Edited by Terence Yu Thursday, June 14, 2012 2:25 AM
    Thursday, June 14, 2012 2:24 AM
  • Hi,

    I was trying to conect Exchange 2010 server using the commands shared by Mike but i am getting below error and not able to fix. I tried by different authentication method as Basic,Kerberos but still no luck.

    I tried from two work stations, one is in work group and other one is in different forest/Domain than the Exchange setup.

    Pls help...

    PS C:\Users\Administrator> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://EXCH2010SRV/PowerShell/ -Authentication Negotiate -Credential $Usercredential

    [exch2010srv] Connecting to remote server failed with the following error message : The WinRM client cannot process the
     request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is
     disabled in the service configuration. Verify the unencrypted traffic setting in the service configuration or specify
    one of the authentication mechanisms supported by the server.  To use Kerberos, specify the computer name as the remote
     destination. Also verify that the client computer and the destination computer are joined to a domain. To use Basic, s
    pecify the computer name as the remote destination, specify Basic authentication and provide user name and password. Po
    ssible authentication mechanisms reported by server: For more information, see the about_Remote_Troubleshooting Help to
    pic.


    Regards:Mahesh

    Thursday, June 14, 2012 5:47 AM
  • Hi
       You can read this case abut your error.
       http://social.msdn.microsoft.com/Forums/is/csharpgeneral/thread/0d8d1052-4e3c-4cf2-b25b-2a13a24ba0e1

    Terence Yu

    TechNet Community Support

    Thursday, June 14, 2012 7:42 AM
  • Hi,

    I tried all above articles but still facing the problem and event id :4648 is getting logged in the workstation from which i am trying.

    Pls note that i am trying from workstation which is installed with Windows 2008 R2 but it is not part of the domain where exchnage is installed, this workstation is in WORKGROUP.

    Kindly help if any one has tried this...


    Regards:Mahesh

    Thursday, June 14, 2012 11:14 AM
  • Hi 
       Thank you for your update.

    I am trying to involve someone familiar with this topic to further look at this issue.


    Terence Yu

    TechNet Community Support

    Monday, June 18, 2012 1:16 AM
  • Hi Mahesh,

    Can you try to run the command without the "-Authentication Negotiate " and test to see if you can initiate the session?


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Surika Microsoft Online Community Support

    Tuesday, June 26, 2012 5:50 AM
  •  Hi,

     Tried without "-Authentication Negotiate " also but it couldnt succeed


    Regards:Mahesh

    Wednesday, June 27, 2012 5:55 AM
  • From the command prompt/PowerShell, please set the TrustedHosts from “*” to “” – i.e. from wildchar * to nothing by running the command

    Winrm set winrm/config/client `@`{TrustedHosts=`”`”`}

    Then add "-Authentication Negotiate"  and run the command.  Please run the command with -verbose as well.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Surika Microsoft Online Community Support

    Tuesday, July 03, 2012 3:26 AM