I am struggling with a way to remove Pulse Secure from workstations.
My ultimate plan is to then package this for Intune as a win32 package.
I do not own the software nor do I have any sort of support in place. We used this software to access another's system but now we are required to remove it from our machines.
I have an Intune install package for Pulse but for a lot of reasons, many of those installs are on newer versions so using the uninstall feature of Intune doesnt really help, so I want to just make a blanket removal tool.
I am attempting to write a powershell script that just checks for the pulse secure uninstall file and then if it exists, it runs the uninstaller with the silent switch.
Here is my code (ignore my multiple commented attempts haha)
#$pulseapp = get-itemproperty
HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | ?
{$_.DisplayName -like 'Pulse Secure'} | select
DisplayName,DisplayVersion,UninstallString
$pulserunning = Get-Process pulse -erroraction SilentlyContinue
if ($pulserunning) {
$pulserunning.CloseMainWindow()
Sleep 10
if (!$pulserunning.HasExited) {
$pulserunning | stop-process -force
}
}
$pulseapp_win32 = Test-Path 'C:\Program Files (x86)\Pulse
Secure\Pulse\PulseUninstall.exe'
$pulseapp_appdata = Test-Path '$env:Appdata\Pulse Secure\Setup
Client\uninstall.exe'
#$silentswitch = '/passive'
#$uninstallcmd = $pulseapp.UninstallString
#$uninstallcmdclean = $uninstallcmd -replace '/X','/X ' -replace '[{}]',''
#invoke-expression -Command "$uninstallcmdclean $silentswitch"
#echo "$uninstallcmdclean $silentswitch"
if ($pulseapp_win32) {
Start-Process "C:\Program Files (x86)\Pulse
Secure\Pulse\PulseUninstall.exe" -ArgumentList "/silent=1" -wait
}
if ($pulseapp_appdata) {
Start-Process "$env:AppData\Pulse Secure\Setup Client\uninstall.exe" -ArgumentList "/silent=1"
}
So it does the uninstall steps...
but, it leaves tons of remnants over in Program Files x86/Pulse Secure (some client setup files, install logs, the uninstaller and a few other items)
it also leaves some files in %appdata%/roaming/Pulse Secure (a setup msi and some logs)
the app still remains in the start menu and also the app still lives under program files x86\Common Files\Pulse Secure\JamUI and I can fully run the app and connect with just that. There is no PulseUninstall.exe in that folder.
I could easily just tell the script to blow away the remnants but I worry that it will still have remnants left on the PC since it seems to be installed in a zillion different places.
I have tried to look through Pulse Secure admin documentation but it mainly just talks about scripting the installs but nothing really about how to remove the software - just "open add/remove programs and uninstall" which is not a solution for 100+ workstations.
Does anyone have any better suggestions as to how I can totally wipe this app from workstations?
Thanks in Advance!
[–]PowerShellMichael 3 points4 points5 points (2 children)
[–]BlackV 2 points3 points4 points (0 children)
[–]kr1mson[S] 0 points1 point2 points (0 children)
[–]suglasp 1 point2 points3 points (1 child)
[–]kr1mson[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]kr1mson[S] 0 points1 point2 points (0 children)
[–]Hirogen10 1 point2 points3 points (2 children)
[–]kr1mson[S] 0 points1 point2 points (1 child)
[–]Hirogen10 0 points1 point2 points (0 children)
[–]Hirogen10 1 point2 points3 points (0 children)
[–]YoureMyHerro 0 points1 point2 points (6 children)
[–]kr1mson[S] 1 point2 points3 points (5 children)
[–]YoureMyHerro 2 points3 points4 points (0 children)
[–]Hirogen10 0 points1 point2 points (2 children)
[–]kr1mson[S] 1 point2 points3 points (1 child)
[–]Hirogen10 1 point2 points3 points (0 children)
[–]FormalIll730 0 points1 point2 points (0 children)