Created
October 1, 2019 05:43
-
-
Save easternnl/e06a1e6c2f5961f5373eff71cdc95769 to your computer and use it in GitHub Desktop.
EasternRegQuery.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-RegValue([String] $KeyPath, [String] $ValueName) { | |
(Get-ItemProperty -LiteralPath $KeyPath -Name $ValueName).$ValueName | |
} | |
$regpath = $args[0] | |
$regs = @() | |
foreach ($property in (Get-Item $regpath).property) | |
{ | |
$reg = new-object PSObject | |
$reg | add-member -type NoteProperty -Name Key -Value $property | |
$reg | add-member -type NoteProperty -Name Value -Value (Get-RegValue -KeyPath $regpath -ValueName $property) | |
$regs += $reg | |
} | |
$regs | sort -Property key | out-gridview -wait -title "Registry: $($args[0])" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment