Book Image

Mastering Windows PowerShell Scripting

By : Brenton J.W. Blawat
Book Image

Mastering Windows PowerShell Scripting

By: Brenton J.W. Blawat

Overview of this book

Table of Contents (22 chapters)
Mastering Windows PowerShell Scripting
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Registry provider


When you're working with the registry, PowerShell interprets the registry in the same way it does files and folders. In fact, the cmdlets that you use for files and folders are the same that you would use for registry items. The only difference with the registry is the way in which you call the registry path locations. When you want to reference the registry in PowerShell, you use the [RegistryLocation]:\Path\ syntax. This is made available through the PowerShell Windows Registry Provider.

While referencing [RegistryLocation]:\Path\, PowerShell provides you with the ability to use registry abbreviations pertaining to registry path locations. Instead of referencing the full path of HKEY_LOCAL_MACHINE, you can use the abbreviation of HKLM. Some other abbreviations include:

  • HKLM: Abbreviation for HKEY_LOCAL_MACHINE hive

  • HKCU: Abbreviation for HKEY_CURRENT_USER hive

  • HKU: Abbreviation for HKEY_USERS hive

  • HKCR: Abbreviation for HKEY_CLASSES_ROOT hive

  • HKCC: Abbreviation for HKEY_CURRENT_CONFIG...