Someone posted a phishing link in the comments to malware, I've deleted the comment, and I'm disabling comments to prevent further attempts at abuse.
At the time that I wrote these scripts, I was trying to clean up old agents that would not uninstall, did not show up under Win32_Product queries, didn’t have clean registry entries.
If you are a subscriber to ConnectWise Automate, go to the link in your Automate interface for the agent uninstaller and compare it to the one in the script above, that should resolve any doubts you may have regarding the legitimacy of the download link. I know it’s frustrating to trust a “random URL”, but that’s how you can verify it.
I haven’t used ConnectWise Automate in years, I just left this up here to help others.