Function pause ($message) {
    # Check if running Powershell ISE
    if ($psISE) {
        Write-Host "$message" -ForegroundColor Yellow
    }
    else {
        Write-Host "$message" -ForegroundColor Yellow
        $host.ui.RawUI.ReadKey("NoEcho,IncludeKeyDown")
    }
}
# deletes all directories named "bin", "obj", "ClientBin", "packages", ".vs", etc.
$ErrorActionPreference = 'silentlycontinue'
taskkill /im iisexpress.exe /f /t
taskkill /im msbuild.exe /f /t
taskkill /im VBCSCompiler.exe /f /t
$ErrorActionPreference = 'stop'
echo "Processsing. Ignore Errros above this line. Please wait..."
Get-ChildItem .\ -include `
    "bin", "obj", "ClientBin", "packages", ".vs", "Logs", "Temp", "ReportHistory", `
    "node_modules", "dist", `
    "SalesTaxExemptionCertificates", "CreditLimitApprovalDocs", "CreditLimitCollateralDocs", "ReportTemplates" `
    -Force -Recurse | ForEach-Object ($_) { remove-item $_.fullname -Force -Recurse }
pause "Clean Complete"