These are some magical tips and scripts for PowerShell that I want to keep track of.
To create a hard symbolic link with PowerShell you will need to specify the -ItemType
as Junction
for directories or HardLink
for files.
$ New-Item -ItemType Junction -Path "Link" -Target "Target"
$ New-Item -ItemType HardLink -Path "Link" -Target "Target"
This works for both files and directories.
$ New-Item -ItemType SymbolicLink -Path "Link" -Target "Target"