Advertisement
Guest User

Untitled

a guest
Jul 26th, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # HP Bloatware Removal v1.04
  2.  
  3. $ErrorActionPreference = "silentlycontinue"
  4.  
  5. $hpguids = get-wmiobject -class win32_product | where-object {$_.Name -like "*hp*"} | Where-Object { $_.Name -notmatch "client security manager|trust circles" }
  6.  
  7. foreach($guid in $hpguids){
  8. $id = $guid.IdentifyingNumber
  9. &cmd /c "msiexec /uninstall $($id) /qn /norestart"
  10. write-host "$guid.Name has been removed."
  11. }
  12. write-host "All HP Bloatware has been removed."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement