Skip to content

Instantly share code, notes, and snippets.

@Evilcry
Last active December 16, 2019 04:08
Show Gist options
  • Save Evilcry/4540695247859c7acf921e0481bed496 to your computer and use it in GitHub Desktop.
Save Evilcry/4540695247859c7acf921e0481bed496 to your computer and use it in GitHub Desktop.
Eumerate COM objects with elevation ON
$path = "REGISTRY::HKEY_CLASSES_ROOT\CLSID\"
Get-ChildItem -Path $path -Recurse | foreach {
$CurrentKey = Get-ItemProperty -Path $_.PsPath
if ($CurrentKey.PSChildName -match "Elevation") {
$details = Get-ItemProperty -Path $CurrentKey.PSParentPath
Out-File -FilePath ".\elevation.txt" -InputObject $details -Append
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment