Uninstall a junction.


Uninstall-Junction [-Path] <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Uninstall-Junction -LiteralPath <String> [-WhatIf] [-Confirm] [<CommonParameters>]


The Uninstall-Junction removes a junction that may or may not exist. If the junction exists, it is removed. If a junction doesn't exist, nothing happens.

If the path to uninstall is not a direcory, you will see errors.

Uninstall-Junction is new in Carbon 2.0.

Beginning in Carbon 2.2.0, you can uninstall junctions whose paths contain wildcard characters with the LiteralPath parameter.

Related Commands


Name Type Description Required? Pipeline Input Default Value
Path String

The path to the junction to remove. Wildcards supported.

true false
LiteralPath String

The literal path to the junction to remove. Use this parameter if the junction's path contains wildcard characters.

This parameter was added in Carbon 2.2.0.

true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.


Uninstall-Junction -Path 'C:\I\Am\A\Junction'

Uninstall the C:\I\Am\A\Junction