From c2de5f7f4ca1b145743be7ffd4be315888c1dd48 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 3 Feb 2026 12:02:52 +0000 Subject: [PATCH] Fix: add Windows uninstall command support for unified agent The UI only showed a bash uninstall command which doesn't work on Windows. Added PULSE_UNINSTALL env var support to install.ps1 and updated the UI to display platform-specific uninstall commands for both Linux/macOS and Windows. Related to #1176 --- scripts/install.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 0a1b06cb1b..376e693837 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -2,6 +2,9 @@ # Usage: # irm http://pulse/install.ps1 | iex # $env:PULSE_URL="..."; $env:PULSE_TOKEN="..."; irm ... | iex +# +# Uninstall: +# $env:PULSE_UNINSTALL="true"; irm http://pulse/install.ps1 | iex param ( [string]$Url = $env:PULSE_URL, @@ -59,6 +62,9 @@ if (-not $PSBoundParameters.ContainsKey('EnableKubernetes') -and -not [string]:: if (-not $PSBoundParameters.ContainsKey('Insecure') -and -not [string]::IsNullOrWhiteSpace($env:PULSE_INSECURE_SKIP_VERIFY)) { $Insecure = Parse-Bool $env:PULSE_INSECURE_SKIP_VERIFY $Insecure } +if (-not $PSBoundParameters.ContainsKey('Uninstall') -and -not [string]::IsNullOrWhiteSpace($env:PULSE_UNINSTALL)) { + $Uninstall = Parse-Bool $env:PULSE_UNINSTALL $Uninstall +} # --- Administrator Check --- $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)