Jump to content

Uninstalling Solarwinds Products


Recommended Posts

Hi all,

Do anyone of you have a script to remove Solarwinds products? In our case, that should be the N-able Windows agent and Solarwinds MSP (SolarWinds MSP Cache Service, SolarWinds MSP Patch Management Engine, SolarWinds MSP RPC Server). Or have any experience removing it using automation?

Thanks in advance!

 

Link to post
Share on other sites

Maybe this is helpful.. I ran this script in Pulseway to remove Solarwinds N-Central RMM a while back.

It won't uninstall all the software solutions you mention, but it might put you one step closer if you replace some of the code with updated uninstall strings etc.

 

$installstate = Get-Item -path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{940B905A-92ED-4646-B38B-321F80873C37}' -ErrorAction SilentlyContinue

if ($installstate -eq $null)
{
    Write-Host 'N-Central Uninstall Registry, was not found and might already be removed.'
    exit
}
else
{
    Write-Host 'Uninstalling Ncentral RMM Agent'
    Start-Process MsiExec.exe '/X{940B905A-92ED-4646-B38B-321F80873C37} /qn'

    Start-Sleep -s 30

    $program = 'Windows Agent'
    $program2 = 'Ncentral RMM Agent'

    Write-Host 'Verifying uninstallation...'
        $32bit = ((Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall") |
            Where-Object { $_.GetValue( "DisplayName" ) -like "*$program*" } ).Length -gt 0;

        $64bit = ((Get-ChildItem "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall") |
         Where-Object { $_.GetValue( "DisplayName" ) -like "*$program*" } ).Length -gt 0;


        if ($32bit -eq $False -and $64bit -eq $False)
     {
         Write-Host "$program2 were uninstalled successfully."
     }
    
     Write-Host 'Deleting N-Central registry keys...'

    $Reg1 = Test-Path 'HKLM:\SOFTWARE\N-able Technologies'
    if ($Reg1 -eq $True)
    {
    Remove-Item 'HKLM:\SOFTWARE\N-able Technologies' -Recurse
    $Reg1v = Test-Path 'HKLM:\SOFTWARE\N-able Technologies'
    Write-Host 'Registry key 1 still present?' $Reg1v
    }
    else
    {
    Write-Host 'Registry key 1 did not exist and will be ignored.'
    }

    $Reg2 = Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\N-able Technologies Inc. Windows Agent'
    if ($Reg2 -eq $True)
    {
    Remove-Item 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\N-able Technologies Inc. Windows Agent' -Recurse
    $Reg2v = Test-Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\N-able Technologies Inc. Windows Agent'
    Write-Host 'Registry key 2 still present?' $Reg2v
    }
    else
    {
    Write-Host 'Registry key 2 did not exist and will be ignored.'
    }

    $Reg3 = Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Services\N-able Technologies Windows Agent'
    if ($Reg3 -eq $True)
    {
    Remove-Item 'HKLM:\SYSTEM\CurrentControlSet\Services\N-able Technologies Windows Agent' -Recurse
    $Reg3v = Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Services\N-able Technologies Windows Agent'
    Write-Host 'Registry key 3 still present?' $Reg3v
    }
    else
    {
    Write-Host 'Registry key 3 did not exist and will be ignored.'
    }

    $Reg4 = Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Services\N-able Technologies Windows Agent Maintenance'
    if ($Reg4 -eq $True)
    {
    Remove-Item 'HKLM:\SYSTEM\CurrentControlSet\Services\N-able Technologies Windows Agent Maintenance' -Recurse
    $Reg4v = Test-Path 'HKLM:\SYSTEM\CurrentControlSet\Services\N-able Technologies Windows Agent Maintenance'
    Write-Host 'Registry key 4 still present?' $Reg4v
    }
    else
    {
    Write-Host 'Registry key 4 did not exist and will be ignored.'
    }

}
start-sleep s 30
Remove-Item "C:\Program Files (x86)\N-able Technologies" -recurse

$installstate2 = Get-Item -path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{940B905A-92ED-4646-B38B-321F80873C37}' -ErrorAction SilentlyContinue

if ($installstate2 -eq $null)
{
    Write-Host "$program2 was successfully uninstalled."
    exit
}

Link to post
Share on other sites

I did this for NINJA, try playing with the search key where the -match "your program"  but be carefull

 

$UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString

sleep -seconds 2

if (!$UninstallString) { exit }

sleep -seconds 2

$path = $UninstallString -replace "uninstall.exe", ""

sleep -seconds 5

cd $path

sleep -seconds 5

Start-Process -FilePath .\uninstall.exe -ArgumentList "--mode","unattended"

sleep -seconds 40

$Uninstall2 = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match "NinjaRMMAgent" } | Select-Object -Property UninstallString | foreach { $_.UninstallString }

sleep -seconds 220

$Uninstall3 = $Uninstall2 -Replace "MsiExec.exe " , ""

sleep -seconds 5

Start-Process -FilePath MSIExec.exe -ArgumentList $Uninstall3,"/quiet","/passive"

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By DQuiram
      We reinstalled Pulseway on a re-imaged system and after the install we noticed issues. In the patch mgmt section, the status was "assign failed" in red. We rebooted the system and then the service was not starting. We checked the service, it was set to start automatically and in the event log it was generating this error: "Service cannot be started.  The handle is invalid"  We removed the system from Pulseway, uninstalled, and reinstalled. Service is starting normally, but still getting the same issue of the patch policy failing to assign. I tried moving the system to another group that did not have a patch policy at all and got the same result. 
    • By Brant
      I've implemented a script that retrieves and stores the Windows Build Version number to a custom field in the system overview.   It works fine on MOST systems.  However, there are a small number systems that are unable to run the script.  The error message displayed includes: Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
      I used the "Insert Output Variable Code" in the script and verified that it includes the inserted text "Start-Process -FilePath "$env:PWY_HOME\CLI.exe" -ArgumentList ("setVariable  .....".
      For some reason, a few systems do not seem to have the environment variable PWY_HOME set.
      It appears that these systems are using the Enable PowerShell User Impersonation option under Pulseway Manger > Settings > Runtime.
      What is the easiest way to make sure that all of my systems have the PWY_HOME variable set so that any future scripts will not fail because of a missing environment variable?
      Thanks,
      Brant
    • By devansh.gohil
      I had installed Pulseway and then wanted to delete it but I was not able to find Pulseway in the control panel uninstall feature and so I tried manually uninstalling files but that also did not work. I tried running the .msi installer again but an error came up saying that Pulseway is already installed but it still was not showing up. Please help me with this.
    • By ArrowNM
      A Dark Mode option for both the RMM Web UI and PSA UI would be nice.
    • By SpartanGolf6
      I use Pulseway to monitor my finicky Dell Inspiron 15 7000 Gaming Laptop and I noticed my laptop has thousands upon thousands of logs in Event Logs. I specifically need the 'Application Event Logs', 'Security' and 'System' event logs saved, ideally as a .CSV file. I don't know much PowerShell/Bash/VBScript, so I was hoping someone knows how to do this.
×
×
  • Create New...