Navigating the Registry

The core set of features for performing related procedures was discussed previously in the "Using Providers" section in Chapter 3, and include the Registry provider, the cmdlets for working with data stores listed in Table 3-4, and the cmdlets for working with provider drives listed in Table 3-5. As long as you know the key path and understand the available key data types, you can use the Registry provider to view and manipulate keys in a variety of ways.

By default, only the HKLM and HKCU root keys are available in PowerShell. To make other root keys available, you can register them as new PowerShell drives. The following example shows how to register HKCR, HKU, and HKCC:

new-psdrive –name hkcr –psprovider registry –root ...

Get Windows PowerShell™ 2.0: Administrator’s Pocket Consultant now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.