Creates a new junction.
New-Junction [-Link] <String> [-Target] <String> [<CommonParameters>]
Creates a junction given by -Link
which points to the path given by -Target
. If something already exists at Link
, an error is written.
Returns a System.IO.DirectoryInfo
object for the junction, if one is created.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Link | String | The new junction to create |
true | false | |
Target | String | The target of the junction, i.e. where the junction will point to |
true | false |
New-Junction -Link 'C:\Windows\system32Link' -Target 'C:\Windows\system32'
Creates the C:\Windows\system32Link
directory, which points to C:\Windows\system32
.