PowerShell remoting from trusted domain server to trusting domain server RRS feed

  • Question

  • Hi all,

    I have a two way trust between forest A and forest B.  Having set up WinRM on source server in forest A/target server in forest B I added my domain admin account from forest A to be local admin on target server in forest B. Now I can connect from source server in forest A to target server in forest B by using Windows PowerShell remoting but only if I enter my domain admin username/password from forest A – if I omit credentials (I am already logged in elevated PowerShell console as domain admin from forest A) connection fails as if my domain admin credentials can not be passed to target server in forest B.

    To ilustrate, this works:

    PS C:\> Enter-PSSession -ComputerName targetServerFQDN -Credential (Get-Credential)

    cmdlet Get-Credential at command pipeline position 1
    Supply values for the following parameters:
    [targetServerFQDN]: PS C:\Users\adm.db.FORESTANETBIOSNAME\Documents>

    This does not work:

    PS C:\> Enter-PSSession -ComputerName targetServerFQDN
    Enter-PSSession : Connecting to remote server targetServerFQDN failed with the following error message : WinRM cannot process the request. The following error occurred while using Kerberos authentication: Cannot
    find the computer targetServerFQDN. Verify that the computer exists on the network and that the name provided is spelled correctly. For more information, see the about_Remote_Troubleshooting Help topic.
    At line:1 char:1
    + Enter-PSSession -ComputerName targetServerFQDN
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (targetServerFQDN:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

    PS C:\> whoami

    Any ideas on how to solve this?

    Thanks in advance!

    Tuesday, May 26, 2020 2:04 PM

All replies