Following the announcement that Apple has deprecated QuickTime rather than patch the disclosed vulnerabilities, I needed to get the plugin removed from across my organization. I wrote up a quick PowerShell script to search the Registry for the uninstall string and remove QuickTime while logging the process to my server. I then took this script and assigned it through Group Policy as a startup script.
Going by the Registry seems to be a better route to take with this script. I have used WMIC to search for products before but it can be a lot more time consuming that this simple query of the Registry.
You can see my script below. It’s procedural, straight forward, and commented throughout the code.