I’ve been trying to create a simple command which will look through a registry path, and return the NAME of the Key if a value’s data underneath that key is “Like” a string.
I’ve started with:
Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ | where { $_.DisplayName -like 'symantec' }
Nothing gets returned.
IF I can get something returned, I still then need to have the result be the KEY name, which is directly under “Uninstall” and of course is different for each product.
I’m so confused Any advice would be appreciated. I can also use a script but It would be easier with a one line command.