You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
353 B
PowerShell
14 lines
353 B
PowerShell
5 years ago
|
param (
|
||
|
[string] $ToolName
|
||
|
)
|
||
|
|
||
|
$targetPath = $env:AGENT_TOOLSDIRECTORY
|
||
|
if ($ToolName) {
|
||
|
$targetPath = Join-Path $targetPath $ToolName
|
||
|
}
|
||
|
|
||
|
if (Test-Path $targetPath) {
|
||
|
Get-ChildItem -Path $targetPath -Recurse | Where-Object { $_.LinkType -eq "SymbolicLink" } | ForEach-Object { $_.Delete() }
|
||
|
Remove-Item -Path $targetPath -Recurse -Force
|
||
|
}
|