Forum Discussion
CS_HelpDesk
2 years agoGoTo Contributor
To delete a folder at a given destination.
---
Delete
$folderPath = $null
if (Test-Path -Path $folderPath -PathType Container)
{
Remove-Item -Path $folderPath -Force -Recurse
}
else
{
Write-error -Message "$folderPath doesn't exist" -Category InvalidArgument
}