-
-
Save ak9999/e68da02d7957bd7db2a2a647f76d50be to your computer and use it in GitHub Desktop.
$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" |
wmic product where "name like 'ScreenConnect Client%%'" call uninstall /nointeractive |
Glad to hear it helped someone!
So, I got the script working in my environment, but I was wondering what the AWS link is from. Is it a personal repo or an enterprise one? My main concern is using personal repos in a production environment. Would it be possible to change that from the AWS link to a server share perhaps?
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.
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!
Will this work on a probe?
Works great! Thanks for this!
Brilliant, thank you.
Just made an account to let you know it's still helping people to this day, so thanks a lot for that! :)
Still working!!!
Very happy to hear this. I am no longer working in the MSP space, but I am happy to hear that this helped so many people.
Thank you! We'll let you know when it's no longer working so you can get a small taste of the MSP space again :)
If you get the following error with System.Net.Webclient:
The request was aborted could not create ssl/tls secure channel
Just add this to the top of the script
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Still works :)
MSPs still exiting clients without proper cleanup.
Might be slower, but that that "Agent_Uninstaller.exe" is basically just a zip file. Use 7-zip, or whatever, to open the file and pull out both that Uninstall.exe and the Uninstall.exe.config files. Put those in the same location and run the Uninstall.exe. Takes a moment but should still do the trick.
Thank you! Helped so much