I have been given an account from domain1.lc, which I guess got all domain federation setup, etc and is local admin on servers from domain domain2.lc
Logged without issues using the account from domain1.lc into the servers from domain2.lc, eg. server1.domain2.lc, server2.domain2.lc...
After setting up winrm and checked working I cannot send remote scriptblocks or run ps1 scripts remotely between them
Any given help or advise more than welcome
Run in the tests server1 and server2
New-Itemproperty -name LocalAccountTokenFilterPolicy
-path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -propertyType DWord -value 1
Don't know if necessary added domain1.lc TrustedHosts to server1.domain2.lc and server2.domain.lc list
Set-Item WSMan:\localhost\Client\TrustedHosts *.domain1.lc
Successfully logged-in with the user domain1 account in server1.domain2.lc and run
clear
$ComputerName = "server2.domain2.lc"
$securePassword = ConvertTo-SecureString "Password" -AsPlainText -force
$credential = New-Object System.Management.Automation.PsCredential("domain1\user1",$securePassword)
Invoke-Command -ComputerName $ComputerName -ScriptBlock {Get-Process} -Credential $credential
Error
[server2] Connecting to remote server server2.domain2.lc failed with the following error message : WinRM cannot process the request. The following error occurred while using Kerberos
authentication: Cannot find the computer server2.domain2.lc. 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.
+ CategoryInfo : OpenError: (server2.domain2.lc:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : NetworkPathNotFound,PSSessionStateBroken