Skip to content

Instantly share code, notes, and snippets.

Created September 21, 2019 23:48
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Uninstall LabTech and ScreenConnect Agents: For those who are having a hard time uninstalling the LabTech Agent from their computer, the first script will remove the LabTech Agent, and the second will remove ScreenConnect aka (ConnectWise Control).
$url = ""
$output = "C:\Windows\Temp\"
(New-Object System.Net.WebClient).DownloadFile($url, $output)
# The below usage of Expand-Archive is only possible with PowerShell 5.0+
# Expand-Archive -LiteralPath C:\Windows\Temp\ -DestinationPath C:\Windows\Temp\LTAgentUninstaller -Force
# Use .NET instead
[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
# Now we can expand the archive
[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\Windows\Temp\', 'C:\Windows\Temp\LTAgentUninstaller')
Start-Process -FilePath "C:\Windows\Temp\LTAgentUninstaller\Agent_Uninstall.exe"
wmic product where "name like 'ScreenConnect Client%%'" call uninstall /nointeractive
Copy link

Awesome from me too, thank you v much

Copy link

Nice, clean, and simple solution you made!

I could have sworn I saved the uninstall file SOMEWHERE, but NOPE...

Ran your script in powershell ISE, I got a pop-up asking me if I wanted to run the Automate Uninstaller (had the connectwise branding, too) and BOOM.

Thanks, Sir!

Copy link

Imburr commented Jun 7, 2023

Will this work on a probe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment