Jump to content

Powershell remote problems.

Fredrikmikael

Hello!

have been trying to remote to a computer with powershell

this is the guide i have been using: http://www.howtogeek.com/117192/how-to-run-powershell-commands-on-remote-computers/

 

I am able to ping the computer fine and test-wsman works.

When i try to connect to it 

Invoke-Command -ComputerName LENOVO-PC -ScriptBlock { Get-ChildItem C:\ } -credential user

i get the following error message

[LENOVO-PC] Connecting to remote server LENOVO-PC failed with the following error message : Access is denied. For more information, see theabout_Remote_Troubleshooting Help topic.   + CategoryInfo          : OpenError: (LENOVO-PC:String) [], PSRemotingTransportException   + FullyQualifiedErrorId : AccessDenied,PSSessionStateBroken

Any clue ?

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Have you tried with the RDP application?

Have you allowed remote connections to the Lenovo-PC?

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

 

Have you tried with the RDP application?

Have you allowed remote connections to the Lenovo-PC?

 

 

RDP = Remote desktop connection ?

 

if so i get this error message

ITnyL7J.png

 

Does this mean i have to add a firewall exception on the machine i am trying to connect to?

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

 

 
 

 

RDP = Remote desktop connection ?

 

if so i get this error message

ITnyL7J.png

 

Does this mean i have to add a firewall exception on the machine i am trying to connect to?

 

 

No press Windows key + Pause/break key to bring up System Properties, on the left side you will see 'Remote settings'. Click that and under the Remote Desktop section tick the box 'Allow remote connections to this computer' click apply and then OK. Try again after that.

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

No press Windows key + Pause/break key to bring up System Properties, on the left side you will see 'Remote settings'. Click that and under the Remote Desktop section tick the box 'Allow remote connections to this computer' click apply and then OK. Try again after that.

 

it is enabled on both computers

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

it is enabled on both computers

 

both the computers are in the same LAN that you are trying to connect to?

Have you tried using the IP address of the computer instead?

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

both the computers are in the same LAN that you are trying to connect to?

Have you tried using the IP address of the computer instead?

 

won't work either.

i see the computer i'm trying to remote to is running powertshell 4.0 where as my client is 5.0. but that shouldn't matter in theory, should it?

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

won't work either.

i see the computer i'm trying to remote to is running powertshell 4.0 where as my client is 5.0. but that shouldn't matter in theory, should it?

 

No that will work fine, are they both part of the same local network?

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

No that will work fine, are they both part of the same local network?

 

ay, both are a part of the local network

 

 XGREC4d.png

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

ay, both are a part of the local network

 

 XGREC4d.png

 

Hmm... Can you go into your Network and Sharing Center and confirm both computers are part of a 'Private Network'.

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

Hmm... Can you go into your Network and Sharing Center and confirm both computers are part of a 'Private Network'.

 

One of the first thing i checked was that it wasn't set as a public network.

so yes, they are both connected to it as a private network.

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

One of the first thing i checked was that it wasn't set as a public network.

so yes, they are both connected to it as a private network.

 

Do you have any third-party Antivirus/Firewall applications running on either computer? If so try to temp disable them to see if that's the cause. If not would try disabling Windows Firewall just for testing.

Intel I9-9900k (5Ghz) Asus ROG Maximus XI Formula | Corsair Vengeance 16GB DDR4-4133mhz | ASUS ROG Strix 2080Ti | EVGA Supernova G2 1050w 80+Gold | Samsung 950 Pro M.2 (512GB) + (1TB) | Full EK custom water loop |IN-WIN S-Frame (No. 263/500)

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×