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?

2
  • 1
    Does it work if you use the name instead of the IP address? Commented Jul 27, 2018 at 17:02
  • Awesome! It works now! You are a hero @GregAskew! Commented Jul 30, 2018 at 1:46

1 Answer 1

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

1
  • 2
    Thank you Stuka, I have tried the steps above but still encounter the same error.. Commented Jul 30, 2018 at 1:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.