Windows – How to create a new symlink in windows 10 using powershell (not mklink.exe)

powershellwindows 10

If there's docs on it, I'll take that. Any web searches for "symlink" "symbolic link" "windows [10]" "powershell" returns everything except the base command.

Even the powershell docs site returns nothing. Is this not possible?

Best Answer

  1. Start powershell as admin
  2. You need to know 1) the path to target of the link 2) path to location where you want the link 3) the name you want to use to refer to the link.
  3. PS C:\> new-item -itemtype symboliclink -path <path to location> -name <the name> -value <path to target>

Example: If you're in c:\drivers\AMD and you want to link in f:\driver\olddrivers, then you would go

PS C:\> new-item -itemtype symboliclink -path . -name OldDrivers -value f:\driver\olddrivers

And wind up with a symlink path of c:\driver\AMD\OldDrivers