Creating hard and soft links using PowerShell
Creating hard and soft links using PowerShell
Creating hard and soft links using PowerShell
Re: Creating hard and soft links using PowerShell
You can call the `mklink` provided by `cmd`, from PowerShell to make symbolic links:
```
cmd /c mklink c:\path\to\symlink c:\target\file
```
You must pass `/d` to `mklink` if the target is a directory.
```
cmd /c mklink /d c:\path\to\symlink c:\target\directory
```
For hard links, I suggest something like [Sysinternals Junction](http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx).
```
cmd /c mklink c:\path\to\symlink c:\target\file
```
You must pass `/d` to `mklink` if the target is a directory.
```
cmd /c mklink /d c:\path\to\symlink c:\target\directory
```
For hard links, I suggest something like [Sysinternals Junction](http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx).