Search code examples
powershelljunction

Creating a Junction Point on a remote Server (Networkdrive)


I'm trying to create Junction Points in PowerShell. This command on my local Drive works very well:

$Local = New-Item -ItemType Junction -Path C:\install\junction -value C:\cygwin64

This is the same command but for a Network Drive (Remote Server)

$Netwo = New-Item -ItemType Junction -Path I:\TRANSFER\Junction -value I:\somewhere

This command does not throw an error, so the junction point got successfully created

I also tried to do it with UNC-path \\server\share\somewhere and even with the Local Path from the server like D:\Data\somewhere but it still doesn't let me access the Junction I created on the Remote Server.

Does anybody know why?

This is the error screenshot, unfortunately in german, but it basically says "the path is not available"

enter image description here


Solution

  • The sysinternals junction util mentions:

    Note: that Windows does not support junctions to directories on remote shares.

    I can't find any MS KB article that confirms this, but I'm inclined to believe Mark Russinovich on this as he really knows his stuff.