从注册表项获取二进制数据

时间:2014-08-12 20:21:16

标签: powershell registry

我试图将每个注册表项中的数据转换为Powershell中的变量。我有一个For语句,允许我解析名称,并在其下解析通过属性的另一个For语句。我难倒的地方是如何获得属性的实际二进制值?我没有看到,或者忽略了什么。

对于名称,我使用Key [$ i]。对于属性,我使用$ Key [$ i] .Property [$ count]。如何获取$ Key [$ i] .Property [$ count]的二进制值?感谢

enter image description here

2 个答案:

答案 0 :(得分:0)

您可以简单地使用GetValue()方法。

$Key[$i].GetValue($Key[$i].Property[$count])

答案 1 :(得分:0)

我通常使用Get-ItemProperty来获取注册表值 -

$key_path = 'HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Font Management'

(Get-ItemProperty -Path $key_path)."Active Languages"
相关问题