Skip to main content

I am attempting to uninstall the Remote Support Jump Client en-masse across my Windows environment.  Attempting to uninstall via my RMM (NinjaOne)’s software inventory returns an error that says the program is not capable of silent uninstall.  I have attempted to create a batch script to uninstall, but because the installation location of the Client is inconsistent, this has been a struggle.

Has anyone found an effective, repeatable method to uninstall the BeyondTrust Remote Support Jump Client (as well as Privilege Management)?

I know you can uninstall from the representative console, but many of my devices have stopped communicating to the console.

Any help would be greatly appreciated!

We install Privilege Management with the standard .msi file, so uninstalls are standard .msi uninstall parameters. 

 

Jump client (NOTE: We are on version 24.2.3. This might not be accurate with newer versions): 

$UninstallFileList = Get-ChildItem -Path "C:\ProgramData\bomgar-scc-*\bomgar-scc.exe"

foreach($File in $UninstallFileList){
Start-Process -FilePath $File.FullName -ArgumentList "-uninstall silent"
}

 


We have a mixture of MSI and EXE installed clients too.  Similar to the above comment from mjhall this works on the older releases and maybe not the newer ones due to name changes.  This script goes looking through the uninstaller keys and then runs the uninstaller for each one it finds.  You will need to change the base domain names in multiple places (Sorry didnt create a variable for this).  You will find where these need changing by searching for the ### comments.

We use this in a remediation script to clean up when one has gone AWOL and then let Intune push the installer out again.

$ErrorActionPreference = 'SilentlyContinue'
# This script needs to be run in the 64 bit context to get the correct result in Intune.
# $srchAppNames = @("BeyondTrust Remote Support Jump Client remote.example.com,Remote Support Jump Client 23.2.2 [remote.example.com]")
$srchAppNames = "Remote Support Jump Client"
# Search 32 bit Node in registry as well as 64 bit (this may need changing if a 64bit installer was used)
$Wow6432Node = $false

function Search-RegistryUninstallKey {
param($SearchFor)
$results = @()
$keys = Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
ForEach-Object {
$obj = New-Object psobject
Add-Member -InputObject $obj -MemberType NoteProperty -Name GUID -Value $_.pschildname
Add-Member -InputObject $obj -MemberType NoteProperty -Name DisplayName -Value $_.GetValue("DisplayName")
Add-Member -InputObject $obj -MemberType NoteProperty -Name DisplayVersion -Value $_.GetValue("DisplayVersion")
Add-Member -InputObject $obj -MemberType NoteProperty -Name Publisher -Value $_.GetValue("Publisher")
Add-Member -InputObject $obj -MemberType NoteProperty -Name ClickToRunComponent -Value $_.GetValue("ClickToRunComponent")
Add-Member -InputObject $obj -MemberType NoteProperty -Name InstallLocation -Value $_.GetValue("InstallLocation")
Add-Member -InputObject $obj -MemberType NoteProperty -Name UninstallString -Value $_.GetValue("UninstallString")
Add-Member -InputObject $obj -MemberType NoteProperty -Name Wow6432Node -Value "No"
$results += $obj
}
if ($Wow6432Node) {
$keys = Get-ChildItem HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall |
ForEach-Object {
$obj = New-Object psobject
Add-Member -InputObject $obj -MemberType NoteProperty -Name GUID -Value $_.pschildname
Add-Member -InputObject $obj -MemberType NoteProperty -Name DisplayName -Value $_.GetValue("DisplayName")
Add-Member -InputObject $obj -MemberType NoteProperty -Name DisplayVersion -Value $_.GetValue("DisplayVersion")
Add-Member -InputObject $obj -MemberType NoteProperty -Name Publisher -Value $_.GetValue("Publisher")
Add-Member -InputObject $obj -MemberType NoteProperty -Name ClickToRunComponent -Value $_.GetValue("ClickToRunComponent")
Add-Member -InputObject $obj -MemberType NoteProperty -Name InstallLocation -Value $_.GetValue("InstallLocation")
Add-Member -InputObject $obj -MemberType NoteProperty -Name UninstallString -Value $_.GetValue("UninstallString")
Add-Member -InputObject $obj -MemberType NoteProperty -Name Wow6432Node -Value "Yes"
$results += $obj
}
}
foreach ($SearchForApp in $SearchFor) {
$results | Sort-Object DisplayName | Where-Object {$_.DisplayName -match $SearchForApp}
}
}

function cleanup-services {
# Search for services and if found remove them
# Get services with names starting with "bomgar-ps-"
$services = Get-Service | Where-Object { $_.Name -like "bomgar-ps-*" }
# Iterate through each service
foreach ($service in $services) {
# Check if the service is running
if ($service.Status -eq "Running") {
Write-Host "Stopping $($service.Name)..."
# Stop the service
Stop-Service -Name $service.Name -Force
}
# Remove the service
$service = Get-WmiObject -Class Win32_Service -Filter "Name='$($service.Name)'"
$service.delete() | Out-Null
}
}

# Search for applications installers and remove them
$apps = Search-RegistryUninstallKey $srchAppNames
if ($apps) {
foreach ($app in $apps) {
<# The Bomgar Jump Client has two parts to the installer the MSI and the EXE (The EXE is wrapped in the MSI) and we need to remove both.
MSI: BeyondTrust Remote Support Jump Client remote.example.com
EXE: Remote Support Jump Client 23.2.2 [remote.example.com]
#>
### The below line will need to updated to match the site base address
if ($app.DisplayName -eq "BeyondTrust Remote Support Jump Client remote.example.com") {
#$MyApp = Get-WmiObject -Class Win32_Product | Where-Object{$app.Name -eq "BeyondTrust Remote Support Jump Client remote.example.com"}
#$MyApp.Uninstall() | Out-Null
### The below line will need to updated to match the site base address
$app = Get-WmiObject -Class Win32_Product -Filter "Name = 'BeyondTrust Remote Support Jump Client remote.example.com'"
$app.Uninstall() | Out-Null
}
### The below line will need changing to match the site base address.
elseif ($app.DisplayName -match "Remote Support Jump Client \d{1,2}\.\d{1,2}\.\d{1,2} \[remote\.example\.com\]") {
If (Test-Path "$($InstallLocation)\pinuninstall.bat" -PathType Leaf) {
Start-Process -FilePath "$env:windir\system32\cmd.exe" -ArgumentList "/c `"$($app.InstallLocation)\pinuninstall.bat`"" -WorkingDirectory "$($app.InstallLocation)" -wait
}
If (Test-Path "$($app.InstallLocation)") {
start-sleep 30
cleanup-services
Remove-Item -LiteralPath "$($app.InstallLocation)" -Force -Recurse
}
If (Test-Path -LiteralPath "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$($app.GUID)") {
Remove-Item -LiteralPath HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$($app.GUID) -Recurse -Force
cleanup-services
}
}
}
}


### This may need updating depending on the path of the client install
If (Test-Path "$Env:ProgramData\bomgar-jump-client") {
start-sleep 30
Remove-Item -LiteralPath "$Env:ProgramData\bomgar-jump-client" -Force -Recurse
cleanup-services
}