Search code examples
powershellregistry

Get binary data from registry key


I am trying to get the data from each registry entry into a variable in Powershell. I have a For statement that allows me to parse through the names, with another For statement under it that parses through the properties. Where I am stumped is how to get the actual binary value for the property? I don't see, or am overlooking something.

For the Names, I use Key[$i]. For the properties, I use $Key[$i].Property[$count]. How do I get the binary value for $Key[$i].Property[$count]? Thanks

enter image description here


Solution

  • You could simply use the GetValue() method.

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