Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've been doing searches on my registry and everything works well except HKLM. A search on HKLM takes hours and doesn't seem to work.

I'm using some powershell code from here

gci . -rec -ea SilentlyContinue | % { if((get-itemproperty -Path $_.PsPath) -match “<SomeText>”) { $_.PsPath} }

This is running as administrator on WinXP under a domain logged into both administrator as well as domain admin.

After a few expected security warnings for SAM and the like, it continues searching for hours--I could do better with F3 in regedit. It doesn't seem to find anything, either. Any ideas on why it's so slow?

Also, just as a side note, if I search HKU and HKLM, do I end up searching the whole registry (besides PERFORMANCE_DATA and DYN_DATA)?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

This questions was asked regarding the filesystem on SO here. I would imagine the same applies to using it for the registry. I linked to Lee Holmes blog post on PowerShell Team's blog.

I would expect you might get a quicker search using REG.exe with the /QUERY parameter.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.