Remove-Junction

Removes a junction.

Syntax

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

Description

Safely removes a junction without removing the junction's target. If you try to remove something that isn't a junction, an error will be written. Use Test-PathIsJunction or the IsJunction extended method on DirectoryInfo object.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String The path to the junction to remove. false 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

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

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