O'Reilly logo

Windows PowerShell™ 2.0: Administrator’s Pocket Consultant by William R. Stanek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required