Removes a junction.
Remove-Junction [[-Path] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
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.
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 . |
Remove-Junction -Path 'C:\I\Am\A\Junction'
Removes the C:\I\Am\A\Junction