Writing Registry Key Default Values

by Dec 8, 2011

If you need to set the default value for a registry key, you can use either of these approaches:

Set-ItemProperty -Path HKCU:\Software\Somekey -Name (Default) -Value MyValue

Or, you can just do this:

Set-Item -Path HKCU:\Software\Somekey -Value MyValue

Twitter This Tip!
ReTweet this Tip!