When using PowerShell 2.0 to query the registry from a 32-bit process,
it is not possible to query the 64-bit registry view. This results in the inability to manipulate 64-bit registry keys and values from a 32-bit process as well. One way to handle this is to use the .Net StdRegProv class. This class allows you
to set the architecture or "alternate registry view" as part of your registry query.
This Script is a collection of PowerShell cmdlets that can be run
in either x86 or x64 processes to handle common registry operations utilizing alternate registry views. This script is compatible with PowerShell versions 2.0 or later.
Use import-module to incorporate these cmdlets with your script.