I'm looking to find the path and data of a specific reg_binary value in a random sub key using Powershell.
If I run the following command it will return all keys and values:
Get-ChildItem "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\my outlook profile" | ForEach-Object {Get-ItemProperty $_.pspath}
I only want reg_binary 00036601
(this determines if the Outlook 2010 profile is cached or not).
This will find the keys, and get the values out. Although I don't have any called '00036601' on my system.
$regRoot = "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\outlook profile"
$regKeys = Get-ChildItem $regRoot | where {$_.GetValueNames() -contains '00036601'}
$regKeys | foreach {$_.GetValue('00036601')}