Fail to create New-Symlink

Topics: User Forum
Jul 5, 2010 at 11:02 AM

I'm having trouble using New-symlink command. I'm trying to create a "soft" link from my network drive to a local one, as in

 

>  new-symlink Z:\Tobbe\Bioware D:\dokument\BioWare

(drive Z: is mapped to my NAS share)

 

The command apparently "succeeds" (no output whatsoever) but the link isn't created.

I also tried the debug mode, and received the output

> new-symlink Z:\Tobbe\Bioware D:\dokument\BioWare -debug
DEBUG: Validating LiteralPath
Confirm
Continue with this operation?[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"):
DEBUG: ValidatePscxPath: parameter LiteralPath ; pscxPath Z:\Tobbe\Bioware
Confirm
Continue with this operation?[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"):
DEBUG: Validating TargetPath
Confirm
Continue with this operation?[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"):
DEBUG: ValidatePscxPath: parameter TargetPath ; pscxPath D:\dokument\BioWare
Confirm
Continue with this operation?[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"):
DEBUG: ValidateExists
Confirm
Continue with this operation?[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"):
Mode           LastWriteTime       Length Name
----           -------------       ------ ----
d----     2010-07-05     12:40  Bioware PS Microsoft.PowerShell.Core\FileSystem::\\nas-torsti-68\documents\Tobbe>

 The "link directory" is then created, but it remains empty. I guess this might just be some misunderstanding from my side, but I need help nevertheless.

Developer
Jul 7, 2010 at 4:41 AM

Is the remote system windows 2008 or later?

"Unlike an NTFS junction point (available since Windows 2000), a symbolic link can also point to a file or remote SMB network path. While NTFS junction points support only absolute paths on local drives, the NTFS symbolic links allow linking using relative paths. Additionally, the NTFS symbolic link implementation provides full support for cross-filesystem links. However, the functionality enabling cross-host symbolic links requires that the remote system also support them, which effectively limits their support to Windows Vista and later Windows operating systems"

Jul 7, 2010 at 8:34 AM

That probably explains it: the remote system is Linux (it's a netgear router with some Debian variant I think).

Jul 16, 2010 at 2:36 AM

Yeah, that's probably it - but I noticed that I needed to run powershell as administrator (elevated process) to get it to work (for local to local).  There was no error when running non-elevated, it just didn't create the link.  Perhaps it's not reporting errors...