Creating a symbolic link to mapped network drive in Windows

Solution 1:

Run cmd as administrator and use UNC path.

The following command worked for me as administrator:

mklink /D C:\temp11111 \\server\share\foldername\

And also check whether your command contains appropriate quotes (").

Solution 2:

This is a old thread, but still want to clarify that you can create symbolic links like this:

Your user account has some security policies on them by default which can be disabled, through secpol.msc. Go to the Run dialog and type:

secpol.msc
  • Navigate to: Local Policies > User Rights Assignment
  • Double click: Create Symbolic Links
  • Add your username to the list, click OK
  • Log off

When you log back in, run cmd with admin privileges. Now you should be able to run mklink commands like this with no problems:

mklink /d %userprofile%\music \\server\music

Note: Make sure the directory you're trying to link to exists or hasn't been moved or deleted, prior to linking.