Quick, effective and quite often dirty. The mantra, work smarter not harder.
This is was a one line Uninstall command, that if modified to fit your needs, will would remove almost any application… Simply replace iTunes with the Application Name, or part of the Application Name (as it appears in Add Remove Programs), and this Uninstall command should work most of the time.
Powershell.exe -command "& {$app = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like '*iTunes*' }; $app.Uninstall()}
Unfortunately, as pointed out in the comments, this approach is no longer recommended. Instead, the best course of action would be to refer to this Microsoft article: Working with software installations – PowerShell | Microsoft Learn

Leave a Reply