Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Invoke-Command -ComputerName TargetNameHere -ScriptBlock {Get-UICulture}
  2.  
  3. Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
  4. Where-Object DisplayName -eq CCleaner
  5.  
  6. if (Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
  7. Where-Object DisplayName -eq CCleaner -OutVariable Results) {
  8. & "$($Results.InstallLocation)\uninst.exe" /S
  9. }
  10.  
  11. \\ Check After Ran
  12. Get-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
  13. Where-Object DisplayName -eq CCleaner
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement