How to create a hardlink file in PowerShell on Windows 10?

How to create a file link in PowerShell on Windows 10?

PSCX has New-Hardlink , but is it still needed for Windows 10?

You can always use the mklink shell, but from a shell that requires you to prefix the cmd /c command, which is ugly and hard to remember.

+8
powershell windows-10 hardlink
source share
1 answer

New-Item -ItemType HardLink -Name CoverageCount.cs -Value ..\..\OPIAspnet5\Models\CoverageCount.cs

The ItemType parameter now includes a type for hard links, which I believe is the hidden gem of PowerShell in Windows 10.

+12
source share

All Articles