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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = "https://s3.amazonaws.com/assets-cp/assets/Agent_Uninstaller.zip" | |
$output = "C:\Windows\Temp\Agent_Uninstaller.zip" | |
(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\Agent_Uninstaller.zip -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\Agent_Uninstaller.zip', 'C:\Windows\Temp\LTAgentUninstaller') | |
Start-Process -FilePath "C:\Windows\Temp\LTAgentUninstaller\Agent_Uninstall.exe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wmic product where "name like 'ScreenConnect Client%%'" call uninstall /nointeractive |
To this day it still works. I love you for making it haha - works perfectly!!! Thanks again for making this, @ak9999
To this day it still works. I love you for making it haha - works perfectly!!! Thanks again for making this, @ak9999
Music to my ears. :)
Awesome, saved me a lot of heartache.
<3 <3 <3
Awesome from me too, thank you v much
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!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you have ConnectWise Automate, when you click to download the agent uninstaller, they give you this link. You can access it whenever you want without authentication, so I just used it in my script.