I have a set of keys in the registry, of which some have a specific value set for (Default). I need to build an array of just the names of those keys with (Default) equal to a certain value. I have been playing with this scratch code, and I get back the entire key object, and for the life of me I can't grok how to pipe just the key names as text into my array.
I assume this can be done in a one liner, rather than filling a temp array with objects and iterating through that to make a final array?
Thanks!
Gordon
Get-ChildItem "Registry::HKLM\SOFTWARE\PragmaticPraxis"
| Get-ItemProperty -Name:'(default)' -ErrorAction SilentlyContinue
| Where-Object -FilterScript {($_.'(default)' -eq 'Rollout') }
And, the secret sauce is
Select -ExpandProperty PSChildName