Skip to content

Instantly share code, notes, and snippets.

@ScriptingPro
Created October 15, 2019 00:14
Show Gist options
  • Save ScriptingPro/fb0fc7a6731990144c8113e0c423580f to your computer and use it in GitHub Desktop.
Save ScriptingPro/fb0fc7a6731990144c8113e0c423580f to your computer and use it in GitHub Desktop.
Uninstall BeyondTrust PowerBroker from Windows System
# PBIS / Likewise / PowerBroker
# Removes PowerBroker and leftover registry and file remnants
Invoke-Expression 'C:\Windows\SysWOW64\msiexec.exe /x {0972AA62-BF13-4B6E-9AD2-1C290A1AFB65}'
Remove-Item -Path "C:\Program Files\BeyondTrust" -Recurse -Force # get rid of the leftovers
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
Get-ChildItem HKCR:\CLSID | ?{$_.Property -contains "(default)"} | Get-ItemProperty -name "(default)" | ?{$_.'(default)' -like "Centeris.Likewise*"} | Remove-Item -Recurse
Get-ChildItem HKCR:\Record -Recurse | ?{$_.Property -contains "Class"} | Get-ItemProperty -name "Class" | ?{$_.Class -like "Centeris.Likewise*"} | %{Remove-Item $_.PSParentPath -Recurse}
Remove-Item "HKCR:\Centeris.Likewise.Auth.FindShellExt.ShellExtensionBridge" -Recurse
Get-ChildItem HKCR:\CLSID -Recurse | ?{$_.Property -contains "Class"} | Get-ItemProperty -name "Class" | ?{$_.Class -like "Centeris.Likewise*"} | %{Get-Item $_.psparentpath | %{remove-item $_.psparentpath -Recurse }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment