我正在寻找使用Powershell在随机子密钥中找到特定reg_binary值的路径和数据。
如果我运行以下命令,它将返回所有的键和值:
Get-ChildItem "HKCU:SoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfilesmy outlook profile" | ForEach-Object {Get-ItemProperty $_.pspath}
我只想要reg_binary 00036601
(这决定了Outlook 2010配置文件是否被缓存)。
这将找到键,并获得值。虽然我的系统中没有任何名为"00036601"的。
$regRoot = "HKCU:SoftwareMicrosoftWindows NTCurrentVersionWindows Messaging SubsystemProfilesoutlook profile"
$regKeys = Get-ChildItem $regRoot | where {$_.GetValueNames() -contains '00036601'}
$regKeys | foreach {$_.GetValue('00036601')}