May 20th, 2013

PowerTip: Create an XML Representation of a Registry Key with PowerShell

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to create an XML representation of a registry key.

Hey, Scripting Guy! Question How can I easily create an XML representation of a registry key by using Windows PowerShell?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdllet and the registry provider to get the registry key, and pipe the results to the Export-CliXML cmdlet:

Get-ChildItem ‘HKCU:\Software\Microsoft\Active Setup’ -Recurse | Export-Clixml -Path c:\fso\active.xml

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.