4

I tried to copy files to Windows server 2019 core referring to https://msdn.microsoft.com/en-us/library/mt708806(v=vs.85).aspx. But after i ran the commands: $ip = "192.168.0.100" # replace with your Nano Server's IP address $s = New-PSSession -ComputerName $ip -Credential ~\Administrator

I got below errors: enter image description here

I have already add the two servers into the trustedhosts in each other's local files(Set-Item WSMAN:\localhost\Client\TrustedHosts srvname -force), and also disable the firewall on the remote server.

How can I fix the issue?

Sue.J
  • 366
  • 3
  • 12

1 Answers1

2

This link will be helpful in resolving Enter-PSSession (http://jeffgraves.me/2013/10/14/powershell-remoting/) WinRM denies.

For our specific case we did the following:

On the Local machine winrm quickconfig (although this was already configured)

winrm s winrm/config/client '@{TrustedHosts="myservername.domain"}'

On the Remote machine

enable-psremoting -force

Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell -Force

https://stackoverflow.com/questions/16062033/cannot-create-remote-powershell-session-after-enable-psremoting

Stuka
  • 5,181
  • 13
  • 11