Files
claudetools/projects/msp-tools/guru-rmm/agent/deploy/glaztech-slc/uninstall.ps1
Mike Swanson 6c316aa701 Add VPN configuration tools and agent documentation
Created comprehensive VPN setup tooling for Peaceful Spirit L2TP/IPsec connection
and enhanced agent documentation framework.

VPN Configuration (PST-NW-VPN):
- Setup-PST-L2TP-VPN.ps1: Automated L2TP/IPsec setup with split-tunnel and DNS
- Connect-PST-VPN.ps1: Connection helper with PPP adapter detection, DNS (192.168.0.2), and route config (192.168.0.0/24)
- Connect-PST-VPN-Standalone.ps1: Self-contained connection script for remote deployment
- Fix-PST-VPN-Auth.ps1: Authentication troubleshooting for CHAP/MSChapv2
- Diagnose-VPN-Interface.ps1: Comprehensive VPN interface and routing diagnostic
- Quick-Test-VPN.ps1: Fast connectivity verification (DNS/router/routes)
- Add-PST-VPN-Route-Manual.ps1: Manual route configuration helper
- vpn-connect.bat, vpn-disconnect.bat: Simple batch file shortcuts
- OpenVPN config files (Windows-compatible, abandoned for L2TP)

Key VPN Implementation Details:
- L2TP creates PPP adapter with connection name as interface description
- UniFi auto-configures DNS (192.168.0.2) but requires manual route to 192.168.0.0/24
- Split-tunnel enabled (only remote traffic through VPN)
- All-user connection for pre-login auto-connect via scheduled task
- Authentication: CHAP + MSChapv2 for UniFi compatibility

Agent Documentation:
- AGENT_QUICK_REFERENCE.md: Quick reference for all specialized agents
- documentation-squire.md: Documentation and task management specialist agent
- Updated all agent markdown files with standardized formatting

Project Organization:
- Moved conversation logs to dedicated directories (guru-connect-conversation-logs, guru-rmm-conversation-logs)
- Cleaned up old session JSONL files from projects/msp-tools/
- Added guru-connect infrastructure (agent, dashboard, proto, scripts, .gitea workflows)
- Added guru-rmm server components and deployment configs

Technical Notes:
- VPN IP pool: 192.168.4.x (client gets 192.168.4.6)
- Remote network: 192.168.0.0/24 (router at 192.168.0.10)
- PSK: rrClvnmUeXEFo90Ol+z7tfsAZHeSK6w7
- Credentials: pst-admin / 24Hearts$

Files: 15 VPN scripts, 2 agent docs, conversation log reorganization,
guru-connect/guru-rmm infrastructure additions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 11:51:47 -07:00

85 lines
3.2 KiB
PowerShell

# GuruRMM Agent Uninstaller
# Compatible with: Windows 7 SP1+ / PowerShell 2.0+
$ErrorActionPreference = "Stop"
$InstallPath = "C:\Program Files\GuruRMM"
$ConfigPath = "C:\ProgramData\GuruRMM"
$ServiceName = "GuruRMMAgent"
Write-Host "GuruRMM Agent Uninstaller" -ForegroundColor Cyan
Write-Host "==========================" -ForegroundColor Cyan
Write-Host ""
# Check for admin privileges
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]"Administrator")
if (-not $isAdmin) {
Write-Host "ERROR: Please run as Administrator" -ForegroundColor Red
Write-Host "Right-click PowerShell and select 'Run as Administrator'"
exit 1
}
# Check if agent executable exists
$agentExe = "$InstallPath\gururmm-agent.exe"
if (Test-Path $agentExe) {
# Use the agent's built-in uninstall command
Write-Host "Running agent uninstall..." -ForegroundColor Yellow
$uninstallResult = & $agentExe uninstall 2>&1
Write-Host $uninstallResult
Start-Sleep -Seconds 3
} else {
# Manual cleanup if agent exe is missing
Write-Host "Agent executable not found, performing manual cleanup..." -ForegroundColor Yellow
# Try to stop and remove service manually
$service = $null
try { $service = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue } catch {}
if ($service) {
Write-Host "Stopping service..." -ForegroundColor Yellow
try { Stop-Service -Name $ServiceName -Force -ErrorAction SilentlyContinue } catch {}
Start-Sleep -Seconds 2
Write-Host "Removing service..." -ForegroundColor Yellow
$scResult = & sc.exe delete $ServiceName 2>&1
Write-Host $scResult
Start-Sleep -Seconds 2
}
}
# Remove install directory
if (Test-Path $InstallPath) {
Write-Host "Removing install directory: $InstallPath" -ForegroundColor Yellow
try {
Remove-Item -Path $InstallPath -Recurse -Force -ErrorAction Stop
Write-Host " Removed successfully" -ForegroundColor Gray
} catch {
Write-Host " WARNING: Could not remove (files may be in use)" -ForegroundColor Yellow
Write-Host " Try again after reboot or manually delete: $InstallPath"
}
}
# Ask about config directory
if (Test-Path $ConfigPath) {
Write-Host ""
Write-Host "Config directory exists: $ConfigPath" -ForegroundColor Yellow
Write-Host "This contains your agent configuration (agent.toml)."
Write-Host ""
$response = Read-Host "Remove config directory? (y/N)"
if ($response -eq "y" -or $response -eq "Y") {
try {
Remove-Item -Path $ConfigPath -Recurse -Force -ErrorAction Stop
Write-Host "Config directory removed" -ForegroundColor Gray
} catch {
Write-Host "WARNING: Could not remove config directory" -ForegroundColor Yellow
}
} else {
Write-Host "Config directory preserved at: $ConfigPath" -ForegroundColor Gray
}
}
Write-Host ""
Write-Host "========================================" -ForegroundColor Green
Write-Host "GuruRMM Agent uninstalled successfully!" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Green