If you’re like most IT professionals, you know the registry like the back of your hand. But if you’re looking to take your registry skills to the next level, PowerShell is a great tool to consider. In this article, we’ll show you how to use PowerShell to navigate and manage the registry like a pro. PowerShell is a powerful scripting language that can be used to automate tasks and manage files and Registry keys on Windows systems. In this article, we’ll show you how to use PowerShell to navigate and manage the Registry like a pro. First, let’s take a look at some of the basics of Registry navigation using PowerShell. To open the Registry Editor in PowerShell, use the following command: PS C:> regedit Once opened, you can browse through all of the keys and values in the Registry by using various commands such as: Get-Item -Path HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Name Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon | Select-Object -ExpandProperty Path New-Item -Path HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion -Type DWORD -Value 1 etc… In addition, you can also use PowerShell cmdlets such as Export-Clixml or Import-Clixml to export or import Registry data into XML files for further analysis or backup purposes. For more information on working with Registry data in PowerShell, please see our previous blog post entitled “5 Tips for Managing Windows Systems with PowerShell”. ..


The concept of a drive in PowerShell is not about physical drives, but about representing any data store as a consistent interface. Using the right provider you can even access  the registry as if it was a file structure.

Open PowerShell by typing PowerShell into the search bar and pressing enter.

When PowerShell opens, type:

To change to the HKEY_CURRENT _USER hive.

The keys in the registry are like folders. However, key values don’t behave like files. Instead, they are managed as properties of keys and are displayed in the property column.  To see a list of keys you can simply run:

To do more with the keys its easiest to create a variable for the key. Lets make a variable called key, for the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer key.

Next lets see how many values my key variable contains. To do this we need to use a property called ValueCount.

As you can see there are 6 values. It tells us how many values there are but doesn’t tell us what the values are called to do that you need to take a look at the keys property property.

If you want to retrieve the contents of the values you can use the PSPath property along with the Get-ItemProperty command as follows. We will create a variable called value to help us with receiving individual values.

That will retrieve the contents for all values in the key, but because we created the value variable we can parse it an individual property to retrieve. For example.

Will return only the contents of the Shellstate value.

Creating  Keys

Creating new keys is like creating a new folder:

Deleting Keys

Deleting a key is done using  the Remove-Item command like so:

Creating Values

To add new values to a key you must use the Set-ItemProperty

To create a value use the following syntax:

You can replace the path for the key in which you want to create the value and you can substitute the –type parameter for a different type from the above table.

Deleting Values

You can delete values using the Remove-ItemProperty command.