Importing and Exporting Registry Items

A while ago I posted a function to export registry items to either a CSV or XML file. Recently I had a question on Twitter about importing, which I assumed meant from my exported file. The import is actually pretty easy as I’ll show you, although it did require a change to the original Export-Registry function. Continue reading

Export Registry

Over the last week or so I’ve posted some functions for testing whether a given registry item exists or not, or even validating its value. To round this out, today I have an advanced function that makes it easier to export parts of the registry on the local computer. Continue reading

Test Registry Item Revisited

I got some nice feedback on my original Test-RegistryItem function. I had been mulling some enhancements anyway and now have a more robust version that looks at individual values, accepts pipelined input and more The new version now lets you test if a given registry item exists as well as if the value meets some target value. First, here’s the new version, with comment help removed.

The new version writes a custom object to the pipeline which provides more information. Let me walk through an example of the new version.

I want to see if the AutoAdminLogon item has a value of 1. The original part of the function that verifies the path is unchanged. But now if you specify a target value, the function checks to see if the current value matches the actual value.

A variable is defined to indicate if the values match. I also define $Exists since the item was found. After checking for the property value, the function creates a custom object with a few baseline properties.

If I hadn’t been checking a specific property value, this object would have been written to the pipeline. But because I wanted to confirm a target value, a few additional properties are added to the object.

I end up with a custom object like this.

The function also takes pipelined input so I can quickly check to see what keys might be missing. And because I’m now writing an object to the pipeline I can easily filter my results.

I hope you’ll download the new version and let me know what you think. Oh..and that CSV file referenced in the last example? I’ve got that goody saved for another day.

Download Test-RegistryItem v2.0 here.

Test Registry Item

I’ve been doing some work lately involving the registry and Windows PowerShell. One of the tasks was to create new registry keys and entries. But because I wanted to some robustness, I wanted a way to verify if a given key or entry already existed. Continue reading

TechMentor Orlando 2010 Decks and Demos

I had a great time in Orlando at the TechMentor conference. The crowd was enthusiastic and asked good questions. As promised, here are my slide decks and demos. My sessions tend to be heavy on demonstration so I can’t promise you’ll get a ton of value from the decks alone.  You’ll simply have to attend the next TechMentor.

Scripting, Error Handling and Debugging in Windows PowerShell

Top Ten Command Line Tools Every Administrator Should Know

Take Back Your File Server (slides only as demos were live)

I owe the attendees of my error handling and debugging session some additional information since I ran short of time. Stay tuned for future posts on debugging PowerShell 2.0.  Cool stuff.

If you were in one of my sessions and have a follow up question, feel free to post a comment or email me directly: jhicks at  Thanks for all your support and enthusiasm.