Managing Registry Keys and Values

When you are working with the Registry provider, you have many Item and ItemProperty cmdlets available for managing registry keys and values. You’ll use these cmdlets to create, copy, move, rename, and delete registry items.

Creating Registry Keys and Values

You can easily add subkeys and values to the Windows registry using PowerShell. To create keys, you use the New-Item cmdlet. To create key values, you use the New-ItemProperty cmdlet. The basic syntax for creating a key is

new-item [–type registrykey] [–path] Path

where you can optionally specify the type of item you are creating as Registrykey and then use Path to specify where the key should be created. When you create a registry key, New-Item displays results ...

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.