Open Supremist opened 2 weeks ago
Yes, unfortunately the provider-added properties such as PSPath
shadow any item-native properties of the same name (though, fortunately, such name collisions are rare).
Workaround:
(Get-Item Registry::HKCU\Environment).GetValue('PSPath')
Prerequisites
Steps to reproduce
I experience name collisions with registry values named: PSPath, PSParentPath, PSChildName, PSProvider.
PS> Set-ItemProperty -Path Registry::HKCU\Environment -Name PSPath -Value TEST
Check with regedit.exe that PSPath value actually created. Than run:PS> Get-ItemProperty -Path Registry::HKCU\Environment -Name PSPath
Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response