Files
claudetools/clients/dataforth/scripts/restart-ad2-agent.ps1
Mike Swanson 5cbd49ce24 Reorganize repo: compartmentalize scripts by client/project
Move 150+ scripts from root and scripts/ into client/project directories:
- clients/dataforth/scripts/ (110 files: AD2, sync, SSH, DB, DOS scripts)
- clients/bg-builders/scripts/ (14 files: Lesley mgmt, Exchange, termination)
- clients/internal-infrastructure/scripts/ (10 files: GDAP, Gitea, backups)
- projects/msp-tools/scripts/ (9 files: CIPP, MSP onboarding, Datto)
- projects/gururmm-agent/scripts/ (3 files: API test, JWT, record counts)
- clients/glaztech/scripts/ (1 file: CentraStage removal)

Also reorganized:
- VPN scripts → infrastructure/vpn-configs/
- Retrieved API/JS files → api/
- Forum posts → projects/community-forum/forum-posts/
- SSH docs → clients/internal-infrastructure/docs/
- NWTOC/CTONW docs → projects/wrightstown-smarthome/docs/
- ACG website files → projects/internal/acg-website-2025/
- Dataforth docs → clients/dataforth/docs/
- schema-retrieved.sql → docs/database/

Deleted 24 tmp_*.ps1 one-off debug scripts (preserved in git history).
Root reduced from 220+ files to 62 items (docs + directories only).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:15:07 -07:00

24 lines
897 B
PowerShell

# Restart GuruRMM Agent on AD2 via SSH
# Simple approach using SSH to run PowerShell commands
Write-Host "[INFO] Attempting to restart GuruRMM agent on AD2..."
# Try SSH connection (requires VPN to be connected to Dataforth network)
Write-Host "[INFO] Connecting via SSH to 192.168.0.6..."
# Command to run on AD2
$command = "powershell -Command `"Restart-Service gururmm-agent -Force; Start-Sleep -Seconds 2; Get-Service gururmm-agent`""
# Try to execute
try {
# Use native Windows SSH (requires password to be entered manually)
Write-Host "[INFO] Please enter password when prompted: Paper123!@#"
ssh "INTRANET\sysadmin@192.168.0.6" $command
} catch {
Write-Host "[ERROR] SSH connection failed: $_"
Write-Host ""
Write-Host "Alternative: Restart service manually on AD2"
Write-Host "1. RDP to 192.168.0.6"
Write-Host "2. Run: Restart-Service gururmm-agent"
}