Pipelines/Steps/Install/OnPrem/Solr/Uninstall/Delete-Folders.ps1

$ErrorActionPreference = "Stop"

Write-Output "Deleting folders started..."

if (Test-Path $SAFSolrServiceDir) {
    Write-Output "Deleting '$SAFSolrServiceDir'..."
    Remove-Item "$SAFSolrServiceDir" -Recurse -Force | Out-Null
}
else {
    Write-Output "'$SAFSolrServiceDir' doesn't exist..."
}

Write-Output "Deleting folders done."