$searchText = "Testing" dir HKCU:\ -rec -ea SilentlyContinue | ForEach-Object { if((get-itemproperty -Path $_.PsPath) -match $searchText) { $_.PsPath } }