powershell vmware

Retiring VMware Horizon and the PowerShell Removal Tool

Man Throwing Server in Dumpster

At our MSP, we’ve long used VMware Horizon DaaS to deliver remote desktop environments to our clients. While I personally avoided having much to do with this solution, for our Support team it was often a problem product that had varied reliability and constant user experience problems.

Like many in the IT community, we’ve been closely watching the VMware–Broadcom acquisition unfold. One of the significant changes was the sell-off of the Horizon product. This move was mostly the last straw for the product for the business. We weren’t really going to be offering it but hadn’t made a hard decision on not to sell it, but this made our choice for us.

As a result, we made a strategic decision:

  • We would deprecate Horizon from our stack
  • Stop offering it to new clients
  • Begin migrating existing customers to modern alternatives

What We Migrated To

Our replacement strategy focused on solutions that:

  • Were natively integrated with Microsoft 365
  • Supported hybrid work models
  • Did not require bulky virtual desktop infrastructure

Depending on the client, we either:

  • Fully removed the need for Remote Desktops (thanks to Microsoft 365 apps and web access), or
  • Built new Remote Desktop Services (RDS) environments on Microsoft infrastructure where needed

This allowed us to reduce complexity, lower costs, and improve the overall user experience — while aligning with platforms most customers were already using.

The Final Step: Client Removal at Scale

After migrating users, one last issue remained:

How do we cleanly and silently remove the VMware Horizon Client from every managed workstation and laptop across multiple sites?

The Horizon Client is typically installed with several helper components — USB redirection, multimedia engines, smartcard tools, and more. These don’t always uninstall cleanly and can be missed in traditional software removal workflows.

We needed:

  • A repeatable, automated solution
  • Something that worked through Datto RMM
  • Clear logging and error handling
  • Compatibility with multiple Horizon Client versions and components

The Solution: A “Dirty Uninstaller” Script

I (with the help of ChatGPT) developed a PowerShell script designed to be aggressive but safe. It:

  • Uninstalls known MSI ProductCodes for Horizon Client
  • Searches the registry for any components with “VMware Horizon” in the name
  • Deletes residual folders, shortcuts, and registry keys
  • Logs everything to both the RMM output and a local log file
  • Returns a clear exit code for RMM reporting (0 = success, 1 = something left behind)

It’s the final step in every Horizon decommission project we now run — ensuring all traces of the old system are cleanly removed.

Want the Script?

We’ve open-sourced the script on GitHub for others facing the same challenge:

View the script on GitHub

It’s fully documented, safe to run repeatedly, and requires no Horizon installer files to work.

Final Thoughts

This script was born out of necessity since we’re pretty much migrating all our clients away from VMware Horizon, but also for me I know there will be others out there that will be needing the same thing. If you’re in the same position, migrating away from Horizon DaaS, this script might save you hours of manual cleanup across your managed fleet.

If you have questions about Horizon alternatives or want help with large-scale decommissions, feel free to get in touch. We’ve been through it and can help you make a clean break too.

Check out my other articles on VMware here!

Leave a Reply

Discover more from Daniel Bs Tech Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading