guyrleech

Search for registry key or value

Jul 10th, 2025
872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 0.74 KB | Software | 0 0
  1. ## Search for a registry value by value content (use -eq, le, -ge, etc instead of -match for numeric
  2.  
  3. Get-ChildItem -Path HKLM:\SOFTWARE\ -Recurse -PipelineVariable key -EA 0|ForEach-Object { (Get-ItemProperty -Path $key.PSPath -EA 0).psobject.properties | where value -match 'Leech' | select @{n='Key';e={$key.Name}},name,TypeNameOfValue,value }
  4.  
  5. ## Search for a registry value by value name
  6.  
  7. Get-ChildItem -Path HKLM:\SOFTWARE\ -Recurse -PipelineVariable key -EA 0|ForEach-Object { (Get-ItemProperty -Path $key.PSPath -EA 0).psobject.properties | where name -match 'Leech' | select @{n='Key';e={$key.Name}},name,TypeNameOfValue,value }
  8.  
  9. ## Search for a registry key by key name
  10. Get-ChildItem -Path HKLM:\SOFTWARE -Recurse -include '*yellow*'
Tags: registry
Advertisement
Add Comment
Please, Sign In to add comment