How to Read the Registry With PowerShell in Windows 11 and 10, Safely and Without Changing Anything


Last reviewed: November 25, 2026 (Pacific). Steps compared with Microsoft documentation where it exists; none was run on a real PC. The picture at the top is an illustration, not a screenshot.
This guide explains how to read the registry with PowerShell on Windows 11 and Windows 10, using commands that only look. You will list registry keys, read their values, check that a path exists and save notes to a file in a folder you create. None of the commands in this guide writes to the registry. PowerShell reaches the registry through its Registry provider, which Microsoft describes as letting you get, add, change, clear, and delete registry keys, entries, and values. The commands below use only the get side of that list.
Quick answer: how to read the registry with PowerShell
Quick answer
- Open Windows PowerShell as your normal user, then address the registry with paths that start with HKLM: or HKCU:.
- Use Get-ChildItem to list subkeys, Get-ItemProperty to read every value in a key, and Get-ItemPropertyValue to read one named value.
- Use Test-Path to check that a key exists before you read it, and Get-Item to look at the key itself.
- Add -LiteralPath when a key name contains characters that PowerShell could read as wildcards or escape sequences.
- Run only the read commands in this guide. Commands that create, set or remove registry data are named in a warning and never run here.
In this guide
- Quick answer
- Why read the registry with PowerShell
- Before you start: look-only rules and a backup
- How to open PowerShell safely
- Understanding the HKLM and HKCU drives
- Step by step: list keys, read values, check paths
- Which cmdlet answers which question
- Names with special characters and LiteralPath
- Reading the output and saving notes
- Commands that change the registry
- reg query versus PowerShell
- Windows 10 note
- Frequently asked questions
- How this guide was checked
- Sources
Why read the registry with PowerShell instead of clicking through Regedit?
Registry Editor is a visual tool, and it suits browsing. PowerShell works differently. You type the exact path, the command shows exactly what it returned, and you can keep that text as a record. When you want to see what a product left in one branch, a command you can repeat is easier to check than a long sequence of clicks, and it is easier to compare two looks taken at different times.
PowerShell also treats the registry as a hierarchy, much as it treats folders on a disk. That is why the commands are named Get-ChildItem, Get-Item and Test-Path, which are the same verbs PowerShell uses for files. The Microsoft Learn page for Get-ChildItem says the cmdlet is designed to work with the items exposed by any provider, and its examples include registry hives. The page is linked in the sources at the end of this guide.
What this guide covers and what it leaves to other guides
This guide covers reading: listing keys, reading values, checking that a path exists, looking at a key, and saving notes. It does not cover searching the registry for a name in Registry Editor, which is handled in how to search the registry for a program. It also does not repeat the basics of hives, keys and values, which are explained in registry hives, keys and values basics. If you already know the hive and key and only want one value at the command prompt, the other command-line guide is the better fit.
Before you start: look-only rules and a backup
Before you start
The commands in this guide read the registry and do not write to it. Reading is still a reason to be careful with your own settings, so back up the branch you care about before any change you make later, and keep your personal files backed up. Read backing up the registry before changes first. On a PC that your organization manages, ask the administrator before you start.
Good to know
Output can show account names, folder paths and product names. Keep any notes you save in your own folder and do not share them publicly.
Use an ordinary PowerShell window that you open yourself. The commands here are reads, so on most PCs you should not need to open PowerShell as administrator for them. This is general guidance, not a Microsoft statement. If you see an access denied message, stop and read fixing registry permission errors rather than opening the window with elevated rights by reflex.
How to open PowerShell safely on Windows 11 and Windows 10
Select the search box on the taskbar or press the Windows key, type PowerShell, and choose Windows PowerShell from the results. Open it normally. Do not paste commands from a page you do not trust, and do not run a script that someone sent you for this task. The commands in this guide are typed by you, one at a time, and each one is shown in its own box so you can copy it exactly.
If the registry tools themselves are blocked on your PC, PowerShell may also be affected. A Registry Editor that will not open is covered in Registry Editor not opening on Windows 11. If the block comes from a setting that a manager applied, the cause is usually policy rather than a fault in PowerShell, so read the next H3 before you go further.
Windows PowerShell and PowerShell 7
Microsoft's What is Windows PowerShell page says that Windows PowerShell is the version of PowerShell that ships in Windows, and that the latest version of it is Windows PowerShell 5.1. It also says Microsoft is no longer updating Windows PowerShell with new features. PowerShell 7 is a separate product, built on newer .NET and running on Windows, Linux and macOS. The page does not name Windows 10 or Windows 11 in those sentences, so this guide says only what the page says. As general guidance, install PowerShell 7 separately if you want it, and expect the two to behave a little differently. The Learn pages we opened are labelled for the 7.6 version of the documentation, so check Get-Help on your own PC if a command behaves differently from what is described here.
Understanding the HKLM and HKCU drives
PowerShell shows the registry as drives. The Microsoft Learn page for about_Registry_Provider says that the Registry provider creates the HKLM: and HKCU: drives for you. HKLM: stands for HKEY_LOCAL_MACHINE, which holds settings for the whole PC. HKCU: stands for HKEY_CURRENT_USER, which holds settings for the account you are signed in with. When you type a path that starts with HKLM: or HKCU:, PowerShell looks in that hive.
- Does the path start with HKLM: ?
- Yes: it is a machine-wide branch. Changes there affect every user, so read only and ask the vendor about anything you find.
- No: go to the next question.
- Does the path start with HKCU: ?
- Yes: it is the branch for the account you are signed in with. Read the next H3 before you compare results between accounts.
- No: the path is a different hive. Check the spelling and read the next H3.
Why HKCU differs for each signed-in user
Microsoft's provider page says that HKCU: represents HKEY_CURRENT_USER for the currently logged-on user, and that if several users sign in to a computer, each user has a unique HKCU: drive. This matters when you compare results. The same HKCU: path can show different values for two accounts on the same PC, so write down which account you were signed in with. A value can also sit somewhere else entirely, as registry virtualization and VirtualStore explains. Per-user files on disk are a separate subject, covered in per-user registry files such as NTUSER.DAT.
Hives that are not drives by default
HKEY_CLASSES_ROOT (HKCR) and HKEY_USERS (HKU) are not drives in PowerShell by default. Microsoft's provider page says that to work with them you must create a new drive using New-PSDrive. This guide does not create drives, so the commands here use HKLM: and HKCU: only. For what HKCR holds, read the HKCR hive explained for Windows. The 32-bit side of the registry is a separate topic. Microsoft's provider page does not cover 32-bit and 64-bit views, so this guide does not explain them, and the Wow6432Node and registry views guide is the place to read about it.
Step by step: list keys, read values and check paths
The route below follows the order most people need: open PowerShell, choose a key, list its subkeys, read its values, then check and save what you found. Each step ends with what you should see and what to do if it fails.
- Open PowerShell Use an ordinary window, as described above.
- Choose a key Pick a branch that belongs to the product or setting you want to understand.
- List subkeys Use Get-ChildItem to see the keys inside the branch.
- Read values Use Get-ItemProperty or Get-ItemPropertyValue on one key.
- Check and save Use Test-Path if a path is in doubt, then save the output to a file you create.
Step 1: List subkeys with Get-ChildItem
Get-ChildItem lists the items inside a path. Given a registry path, it lists the keys inside that key. The example below lists the subkeys under the Control Panel branch of your own account. Nothing is written, and the output is a list of key names.
Get-ChildItem -Path 'HKCU:\Control Panel'
You should see: a list of keys under Control Panel, such as Desktop, Colors or International, depending on your PC. Each line is a key, not a value.
If this fails: an error that the path does not exist means the spelling or the hive is wrong. Check the path, then run Test-Path from the section below before you go on.
Step 2: Read all values with Get-ItemProperty
Get-ItemProperty gets the properties of the items you name, and Microsoft's page for it says you can also use it to view registry entries and their values. For a key, it shows the value names and their data. The next command reads the Desktop key under your Control Panel branch.
Get-ItemProperty -Path 'HKCU:\Control Panel\Desktop'
You should see: a block of value names with their data, and a few extra fields that PowerShell adds to every registry result. Ignore those extra fields for now; the reading section explains them.
If this fails: if the key is missing on your PC, the error says so. A missing key is a result, not a fault. If the values you see look like they start a program at sign-in, read registry startup entries and Run keys before you decide anything about them.
Step 3: Read one value with Get-ItemPropertyValue
Get-ItemPropertyValue is narrower. Microsoft's page says it gets the current value for a property that you specify with the Name parameter, located in a path given by Path or LiteralPath. Use it when you already know the value name and want only its data. The value name below is an example that exists on many Windows PCs; if it is not present on yours, the command returns an error, which is also a normal result.
Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'Wallpaper'
You should see: the data of that one value, with no value names or extra fields around it.
If this fails: check the value name, which must match what Get-ItemProperty showed you. If the name is right and the path is right, the value may not exist on this PC, which is not a fault in the command.
Step 4: Check that a key exists with Test-Path
Test-Path tells you whether a path exists. Microsoft's page says it returns $true if all elements of the path exist and $false if any are missing. Run it before a long read when you are not sure a key is there. The example uses a key that exists on Windows PCs.
Test-Path -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion'
You should see: True. A False result means one part of the path is missing.
If this fails: a False result is an answer, so check the spelling of each part of the path, including the hive. If you still cannot find the product's key, ask the vendor which key it uses rather than widening the search across a whole hive.
Step 5: Look at the key itself with Get-Item
Get-Item returns the key itself, rather than its values or its subkeys. Use it when you want to confirm which key you are looking at before you read it. Microsoft's about_Registry_Provider page names Get-Item among the cmdlets that work on registry keys. The command below uses the same key as the Test-Path example.
Get-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion'
You should see: one result for the key, with its path shown. It does not list the values inside it; use Get-ItemProperty for those.
If this fails: repeat the Test-Path check first. A missing key cannot be read by Get-Item, and the fix is the same spelling check.
Which cmdlet answers which question
When you are not sure which command you need, use this table. Every row is a read, and the last column describes what you will see, so you know whether the output is a list of keys, a set of values or one value.
| What you want to know | Cmdlet to use | What you will see |
|---|---|---|
| Which keys sit under a branch | Get-ChildItem | A list of subkey names, one per line |
| Every value in one key | Get-ItemProperty | Value names and their data, with extra fields |
| One named value only | Get-ItemPropertyValue | The data of that value, on its own |
| Whether a key or path exists | Test-Path | True or False |
| The key itself, not its contents | Get-Item | One result for the key and its path |
| A name with brackets or other special characters | Any of the above, with -LiteralPath | The same output, with the name read exactly as typed |
Names with special characters and the LiteralPath parameter
Some key names contain characters that PowerShell can read as wildcards or as escape sequences. Square brackets are the usual case. The -Path parameter accepts wildcards, so a bracketed name can be read as a pattern instead of a name. The -LiteralPath parameter avoids that. Microsoft's Get-ItemProperty page says that the value of LiteralPath is used exactly as it is typed, and that no characters are interpreted as wildcards. If the path includes escape characters, the page advises enclosing it in single quotation marks, which is why the commands in this guide use single quotes.
The next command uses a made-up key name with brackets. It is a placeholder that shows the syntax. On most PCs the key will not exist, so the command returns an error, and that error is the expected result. Replace the name with a real key from your own list when you have one.
Get-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\ExampleVendor\[Widget]'
You should see: either the values of a key with that exact name, or an error that it was not found. Both are read results.
If this fails: an error about the path usually means the name is not on this PC. Use Get-ChildItem on the parent branch to see the exact spelling of the names that do exist, and then copy the name exactly.
Reading the output and saving notes
Registry output is not always easy to read at first. Get-ItemProperty returns more than the value names you asked about, and a long list in the console is hard to scan. Two simple techniques help: a list view that shows one property per line, and a text file that you can read in Notepad at your own pace.
Format-List and Select-Object
Format-List turns the result into one property per line, which is easier to read than a wide table. Select-Object lets you keep only the fields you want. The first command below shows all the values under the Desktop key in list form.
Get-ItemProperty -Path 'HKCU:\Control Panel\Desktop' | Format-List
The next command lists only the subkey names under Control Panel. The field PSChildName holds the name of each key, so this gives a short list that is easy to copy into notes.
Get-ChildItem -Path 'HKCU:\Control Panel' | Select-Object -Property PSChildName
You should see: either a list with one property per line, or a single column of key names. Both are easier to file than the wide default output.
Ignoring the extra PowerShell fields
Registry results in PowerShell often carry extra fields that describe where the item sits, such as the path it was read from and the name of its parent. These fields are part of how PowerShell represents registry items, and they are not values from the product you are studying. The Learn pages we opened do not show the full field list in the text we could read, so treat this as general guidance. When you save notes, keep the value names and their data, and drop the extra fields unless you need the parent path to tell two keys apart. If the data looks unfamiliar, check its type first, as covered in registry value types explained.
If you are looking for startup-related values among the ones you read, a separate check of those locations is covered in Autoruns for checking startup entries. Read that guide before you act on anything you find there.
Saving notes to a text file in your own folder
You can pipe the output into a text file that you create. Make the folder first in File Explorer, under your Documents folder, so PowerShell has somewhere to put the file. The command below writes the list view of the Desktop key to a new file. Out-File creates the file, and if a file with that name already exists it is replaced, so choose a new name for each run.
Get-ItemProperty -Path 'HKCU:\Control Panel\Desktop' | Format-List | Out-File "$env:USERPROFILE\Documents\RegNotes\desktop-notes.txt"
You should see: no output in the console if the command works, and a new file called desktop-notes.txt in the RegNotes folder. Open it in Notepad to read it.
If this fails: if the folder is missing, create it in File Explorer and run the command again. Keep the saved file private and never import it as a registry file; checking whether a .reg file is safe explains why a text note is not something to run.
Commands that change the registry: a warning, not a recipe
Some PowerShell cmdlets write to the registry. They are named here only so you can recognise them and stop before using them. This guide does not run them, and it does not ask you to. If you find a guide or a forum post that tells you to run one of these as part of reading the registry, stop there and check with the vendor or the administrator first.
Before you run anything that changes the registry
These cmdlets create, set or remove registry keys and values: New-ItemProperty, Set-ItemProperty, Remove-Item, Remove-ItemProperty and New-Item. They are not part of this guide. Back up the branch first, and read backing up the registry before changes before you consider any change. If a managed PC blocks registry editing, that is a decision for the administrator, and registry editing disabled by an administrator explains what that block means.
If you find a leftover key from a program you removed, the right first step is the program's own uninstaller or the vendor's guidance, not a command. The topic of leftover entries after an uninstall is covered in leftover registry entries after uninstalling, and it is a separate job from reading. Keep the read commands in this guide in their own folder of notes.
reg query versus PowerShell: a short comparison
The reg query command is the other common way to read the registry from a prompt. It answers a similar question for one path at a time and prints the result in its own format. Its own guide is reg query command for reading registry values, and that guide is the place to learn its switches. The two approaches can read the same key. PowerShell gives you objects you can pipe into Format-List or Select-Object, while reg query gives you plain text. Choose the one that fits the note you want to keep.
For a before-and-after look at what an installer wrote, the approach is different again: export a branch, change nothing else, and compare the two files. That method is covered in comparing registry changes before and after, and it is a separate task from the reads in this guide.
Windows 10 note: support dates
This guide applies to both Windows 11 and Windows 10. Microsoft says that Windows 10 reached end of support on October 14, 2025. Its page on Extended Security Updates says that the consumer ESU program for Windows 10 runs until October 12, 2027. If you are on Windows 10, see Microsoft's Extended Security Updates page, which lists the dates and enrolment options, and browse the PC repair guides for other steps.
Frequently asked questions
Commands and output
Does Get-ChildItem change the registry?
No. This guide uses it only to list. The Microsoft page for Get-ChildItem gives an example that gets the registry keys from a hive, and that example describes a listing, not a change. If you want to be sure, run it on a key you know and watch the output rather than the registry.
Why does Get-ItemPropertyValue return only the data?
Its Microsoft description says it gets the current value for a property that you name with the Name parameter. The output is the value on its own, so there are no value names or extra fields around it. If the name is wrong, you get an error instead, which tells you to check the spelling.
Why does a key name with brackets fail with -Path?
The -Path parameter accepts wildcards, so brackets can be read as a pattern rather than as part of the name. Microsoft's description of -LiteralPath says the value is used exactly as typed and no characters are read as wildcards. Use -LiteralPath for such names, as shown in the section on special characters.
Where can I learn to read one value at a time from a prompt?
Get-ItemPropertyValue does that job in PowerShell. For the separate prompt command, read the reg query guide for its own syntax and examples, because this guide keeps to PowerShell.
Scope and safety
Do Windows 10 and Windows 11 need different commands?
This guide does not give separate commands for each version. It describes the same read commands for both. Microsoft's What is Windows PowerShell page says that Windows PowerShell is the version that ships in Windows, and this guide uses that version throughout.
Can I reach HKCR or HKU with these commands?
Not by default. Microsoft's provider page says that you must create a new drive with New-PSDrive for those hives, and this guide does not do that. For background on the classes root hive, read the HKCR hive guide before you decide what you need.
Is it safe to save registry output to a text file?
Saving output creates a new text file in a folder you make, and it does not change the registry. Keep the file private, since it can show account names and paths. Never rename it to a registry file and import it, and checking whether a .reg file is safe explains why a text note should stay a note.
What does a False result from Test-Path mean?
Microsoft says that Test-Path returns False when any element of the path is missing. A False result is therefore an answer about this PC, not a fault in PowerShell. Check the spelling and the hive first. If access is denied rather than missing, the permission guide fixing registry permission errors explains the next step.
How this guide was checked
The cmdlet names, parameter descriptions and drive behaviour were compared with the Microsoft Learn pages for about_Registry_Provider, Get-ItemProperty, Get-ChildItem, Get-ItemPropertyValue and Test-Path, and with Microsoft's What is Windows PowerShell page for the version statements. The Windows 10 dates were compared with Microsoft's Extended Security Updates page. Where a Learn page did not state a point in the text we could read, the guide either says so or uses general guidance wording. Those points include the extra fields that PowerShell adds to registry output, the exact behaviour of Out-File, and the 32-bit and 64-bit views, which this guide does not explain. No command in this guide was run on a real PC, and no testing or lab results are claimed. The top picture is an illustration, not a screenshot.