- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to retrieve windows registry keys and values using PowerShell?
To browse through the registry in PowerShell, we can use the Get-ChildItem command. For example to get all keys from the path HKLM:\Hardware we can use the below command.
Get-ChildItem HKLM:\HARDWARE
Or you can set the location and use the dir (get-ChildItem or ls) command to browse the path.
Example
PS C:\> Set-Location HKLM:\HARDWARE PS HKLM:\HARDWARE> dir
Output
Hive: HKEY_LOCAL_MACHINE\HARDWARE Name Property ---- -------- ACPI DESCRIPTION DEVICEMAP RESOURCEMAP
To get the properties of the key, use the Get-ItemProperty command.
Example
Set-Location 'HKLM:\SOFTWARE\VMware, Inc.' Get-ItemProperty '.\VMware Drivers'
Output
efifw.status : 1|1.1.0.0.0.1|oem2.inf vmxnet3.status : 1|1.1.8.16.0.1|oem3.inf pvscsi.status : 1|1.1.3.15.0.1|oem4.inf vmusbmouse.status : 1|1.12.5.10.0.1|oem5.inf vmmouse.status : 1|1.12.5.10.0.1|oem6.inf
- Related Articles
- How to delete registry Key using PowerShell?
- Windows registry access using Python (winreg)
- How to delete registry key value (property) using PowerShell?
- How to retrieve files and folders attributes using PowerShell?
- How to retrieve Azure VMs using PowerShell?
- How to retrieve certificate thumbprint using PowerShell?
- How to Get Windows features using PowerShell?
- How to remove windows features using PowerShell?
- How to retrieve CSV file headers using PowerShell?
- How to stop a windows service using PowerShell?
- How to start a windows service using PowerShell?
- How to start multiple windows services using PowerShell?
- How to disable windows firewall profiles using PowerShell?
- How to get installed windows update using PowerShell?
- How to find Windows Product Key Using PowerShell?

Advertisements