I have been searching the internet most of the morning for this and I find multiple hits, with very similar code, though they miss the mark for me.
I have been tasked to find specific values (specifically an email address) and do a find and replace.
the basics. Yes I have used get-childitem to riffle through the keys, then for each hive key (foreach) I use get-itemproperty based on $_.PsPath and match a specific string (the email address).
This finds the keys that have a subkey with this value, but it returns them all, not just the one subkey. I ma having issues singling out the subkey with the value. Because of this, I am being very cautious. I would like to output the path (got that $.name), but I cannot get it to single out the subkey with the search value. $.Property lists all the subkeys. As a last test I would like to output the value of that subkey (as a double check before I implement this sucker)