4

It seems I cannot access network resources in a remote Powershell session. This is using Powershell v2. Both the local and remote computers are on the same domain.

As an example, if I am on MachineA and connect to MachineB via Enter-PSSession MachineB, then from there execute something like gci \\MachineA\SomeShare, I get an error: "Cannot find path '\\MachineA\SomeShare' because it does not exist". If I execute the identical command directly from MachineB, I get the results I expect.

I've tried to grant 'read' permissions to 'SomeShare' to 'Everyone' and to the machine account of the remote machine directly. It made no difference.

Is there a configuration change I can make that will allow this to work?

2 Answers 2

4

You need to use "-authentication CredSSP" to double-hop like that.

Here's a good link:

3
  • 1
    Not the answer I was hoping for, as it seems to require reentering credentials, but nevertheless I appreciate the information. Mar 5, 2011 at 4:06
  • This link gave me a 403 error. Here is the updated link: devblogs.microsoft.com/powershell/… Nov 18, 2021 at 13:52
  • thanks...updated the url Nov 19, 2021 at 14:19
1

for use network acces in remote commande like

Invoke-Command -ComputerName $ComputerName -ScriptBlock {test-path '\\otherPC\share\'} -Credential (Get-Credential (whoami)) -Authentication Credssp

To enable client-side SSP for winrm, run the following lines:

Enable-WSManCredSSP -Role client -DelegateComputer *

To enable server-side SSP for winrm:

Enable-WSManCredSSP -Role server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .