Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. foreach ($app in (Get-WmiObject -Query "Select * from Win32_Product where name like 'Microsoft Visual Studio Professional %'")) {
  2. Write-Host "Deleting $app.Name"
  3. &"msiexec.exe" /norestart /q/x $app.IdentifyingNumber REMOVE=ALL
  4. #$app.Uninstall()
  5. }
  6.  
  7. foreach ($app in (Get-WmiObject -Query "Select * from Win32_Product where name like 'Microsoft SQL Server %'")) {
  8. Write-Host "Deleting $app.Name"
  9. &"msiexec.exe" /norestart /q/x $app.IdentifyingNumber REMOVE=ALL
  10. #$app.Uninstall()
  11. }
  12.  
  13. foreach ($app in (Get-WmiObject -Query "Select * from Win32_Product where name like 'Microsoft Azure %'")) {
  14. Write-Host "Deleting $app.Name"
  15. &"msiexec.exe" /norestart /q/x $app.IdentifyingNumber REMOVE=ALL
  16. #$app.Uninstall()
  17. }
  18.  
  19. foreach ($app in (Get-WmiObject -Query "Select * from Win32_Product where name like 'Microsoft .NET Framework %'")) {
  20. Write-Host "Deleting $app.Name"
  21. &"msiexec.exe" /norestart /q/x $app.IdentifyingNumber REMOVE=ALL
  22. #$app.Uninstall()
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement