Q. How can I check to see if a registry key exists in PowerShell?

A. Keep in mind that the shell maps two drives—HKLM: and HKCU:—to the registry. Using those, you can use the Test-Path cmdlet to see if a key, which will behave more or less like a file system folder, exists.

Do you have a Windows PowerShell question? Find more PowerShell FAQs, articles, and other resources at windowsitpro.com/go/DonJonesPowerShell.