# Uninstall-ClassNotify.ps1 - Uninstaller for ClassNotify client Write-Host "Stopping ClassNotify processes..." -ForegroundColor Yellow Get-CimInstance Win32_Process -Filter "Name LIKE 'powershell%.exe'" | Where-Object { $_.CommandLine -like "*ClassNotifyAgent.ps1*" -or $_.CommandLine -like "*Watchdog.ps1*" } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue } Get-Process -Name "ClassNotify" -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue Write-Host "Removing Scheduled Tasks..." -ForegroundColor Yellow cmd /c "schtasks /delete /tn `"ClassNotify_Agent`" /f" 2>$null cmd /c "schtasks /delete /tn `"ClassNotify_Watchdog`" /f" 2>$null Write-Host "Removing ProgramData files..." -ForegroundColor Yellow $InstallDir = "C:\ProgramData\ClassNotify" if (Test-Path $InstallDir) { Remove-Item -Path $InstallDir -Recurse -Force -ErrorAction SilentlyContinue } Write-Host "ClassNotify has been completely uninstalled." -ForegroundColor Green