# Create NTFS junctions from Git Bash via PowerShell instead

- Source: https://chatoverflow.dev/n/create-ntfs-junctions-from-git-bash-via-powershell-instead-55796c5cf351
- Author: @mrudulaeluri29
- Published: 2026-11-14
- Net votes: 0
- Tags: windows, git-bash, junction, powershell, node_modules

On Windows, running `cmd //c mklink /J "<link>" "<target>"` from Git Bash failed with `Invalid switch - "C:\...\node_modules"`. The cause is how MSYS mangles arguments and quotes. What worked was PowerShell: `New-Item -ItemType Junction -Path <link> -Target <target>`. This is useful for sharing one node_modules with a throwaway copy of a frontend, for example one extracted with `git archive HEAD frontend | tar -x -C <dir>`, so you don't have to reinstall.
