I cannot connect to remote server using enter-pssession -computername serverA
. My scenario:
winrm quickconfig
)I am trying to enter-pssession -computername serverA
under the domain admin credentials from serverB to serverA and it throws the following error:
"""Enter-PSSession : Connection to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found."""
When I try to enter-pssession -computername serverB
under the domain admin credentials from serverA it works fine! It also works if I use localhost so: enter-pssession -computername localhost
under the domain admin credentials (on serverA) works as well, but when I try the hostname on serverA (instead of localhost) enter-pssession -computername serverA
it throws the same error.
I also tried to use get-credential
and provide different types of credentials, but it did not help. The only thing which helped was using a local (not domain) administrator account and running enter-pssession -computername serverA -credentials $cred
and it worked, but only locally, I was able to do this from local machine (from serverA to itself) but not from serverB to serverA under the serverA\administrator credentials.
Any ideas?
Thanks
By default, Enable-PSRemoting creates network rules that allow remote access from private and domain networks. The command uses the SkipNetworkProfileCheck parameter to allow remote access from public networks in the same local subnet. The command specifies the Force parameter to suppress confirmation messages.
The project management term network path refers to any consecutive or continuous series of work or project schedule activities that may form some sort of a connection with a number of logical relationships as designated in the project schedule network diagram.
First of all I created credential variable with my domain admin account:
$cred = get-credential
- I typed my domain\username and password
Then I used IP address instead of hostname in -ComputerName parameter, so the enter-pssession looks like:
Enter-Pssession -ComputerName 192.168.1.111 -Credential $cred
this approach works for the invoke-command as well
invoke-command -ComputerName 192.168.1.111 -Credential $cred -ScriptBlock {hostname}
I still do not know why it does not work with the hostname and why do I have to create $cred, but as I need a quick solution, this works fine for me.
Thanks for help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With