Files
Netbox-Client-Agent-for-Win…/scripts/uninstall.ps1
T
MrBlake 3119af1784
Build Windows agent / build (win-arm64) (push) Has been cancelled
Build Windows agent / build (win-x64) (push) Has been cancelled
feat: add Windows hardware inventory collector and NetBox sync
feat: add self-contained Windows build and Intune deployment scripts
docs: document configuration, permissions, and deployment
ci: build x64 and arm64 agent artifacts
2026-07-21 13:25:51 +02:00

11 lines
545 B
PowerShell

param([string]$InstallDirectory = "$env:ProgramFiles\NetBox Windows Agent")
$ErrorActionPreference = 'Stop'
schtasks.exe /Delete /TN 'NetBox Windows Agent' /F 2>$null
if (Test-Path -LiteralPath $InstallDirectory) {
$resolved = (Resolve-Path -LiteralPath $InstallDirectory).Path
$programFiles = (Resolve-Path -LiteralPath $env:ProgramFiles).Path
if (-not $resolved.StartsWith($programFiles + '\', [StringComparison]::OrdinalIgnoreCase)) { throw "Unsicheres Ziel: $resolved" }
Remove-Item -LiteralPath $resolved -Recurse -Force
}