Can PowerShell 1.0 create hard and soft links analogous to the Unix variety?
If this isn't built in, can someone point me to a site that has a ps1 script that mimics this?
This is a necessary function of any good shell, IMHO. :)
Can PowerShell 1.0 create hard and soft links analogous to the Unix variety?
If this isn't built in, can someone point me to a site that has a ps1 script that mimics this?
This is a necessary function of any good shell, IMHO. :)
No, it isn't built into PowerShell. And the mklink utility cannot be called on its own on Windows Vista/Windows 7 because it is built directly into cmd.exe as an "internal command".
You can use the PowerShell Community Extensions (free). There are several cmdlets for reparse points of various types:
New-HardLink,New-SymLink,New-Junction,Remove-ReparsePointIn Windows 7, the command is
fsutil hardlink create new-file existing-file
PowerShell finds it without the full path (c:\Windows\system32) or extension (.exe).
The Junction command line utility from SysInternals makes creating and deleting junctions easy.