8,330 questions
Hi @Filip ,
why are you not using Get-ItemProperty
?
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-itemproperty?view=powershell-7.1
$b = "HKCU:\Control Panel\Colors\"
Get-ItemProperty -Path $b
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten