Skip to content

Instantly share code, notes, and snippets.

@kayasax
Created May 7, 2015 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kayasax/0f77af387588161d0739 to your computer and use it in GitHub Desktop.
Save kayasax/0f77af387588161d0739 to your computer and use it in GitHub Desktop.
remotely uninstall software
Hi,
Please try below code:
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "Software Name"
}
$app.Uninstall()
Please use invoke-command above code to run them on the remote computer, in addition, the below article should be helpful:
Use PowerShell to Find and Uninstall Software
http://blogs.technet.com/b/heyscriptingguy/archive/2011/12/14/use-powershell-to-find-and-uninstall-software.aspx
wershell: Uninstall software on remote computer
http://techibee.com/powershell/powershell-uninstall-software-on-remote-computer/1400
Regards
Yan Li
TechNet Community Support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment