Windows 7, in Powershell (running as admin), running the following command on an offline user:
& REG LOAD HKLM\CHANGEUSER c:\users\testuser\ntuser.dat
Write-Host Loaded with result $?
Result: False. On inspection of the key using regedit, it has NOT been loaded. Note: HKLM\Changeuser is not precreated.
If I use the same command from a command prompt (as admin), it is all fine:
REG LOAD HKLM\CHANGEUSER c:\users\testuser\ntuser.dat
Result: The command completed successfully, and the file has been loaded into the registry.
Why is it not loading into the registry when using powershell? I have attempted with and without the call operator (&), but get the same result.