Question

On Machine A (Windows 8) I've created a symbolic link to a network share on Machine B (Windows 7) in order to compile some specific Windows 8 code.

In order to do this I call Invoke-Command from Machine B but I get the following error:

Access is denied. + CategoryInfo : NotSpecified: (Access is denied.:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError

Both machines use the same user and password. I am able to use Invoke-Command on other executes on the C:\ of Machine A but not from the symbolic link.

Is this a bug or something to do with Powershell's "one hop" security measure?

Was it helpful?

Solution

It sounds like a double hop issue. Try what this example from the Invoke-Command help page is doing:

-------------------------- EXAMPLE 15 --------------------------

PS C:\> Enable-WSManCredSSP -Delegate Server02
PS C:\> Connect-WSMan Server02
PS C:\> Set-Item WSMan:\Server02*\Service\Auth\CredSSP -Value $true
PS C:\> $s = New-PSSession Server02
PS C:\> Invoke-Command -Session $s -ScriptBlock {Get-Item \\Net03\Scripts\LogFiles.ps1} -Authentication CredSSP -Credential Domain01\Admin01


This example shows how to access a network share from within a remote session.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top