Uninstall-Junction

Uninstall a junction.

Syntax

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

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

Description

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

Parameters

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.

EXAMPLE 1

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

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