Writing Registry Key Default Value

Share |

Join PowerShell.com!
Subscribe to Feed

PowerShell eBook
Sign up for
Your PowerTip of the Day:

Powershell Plus

13 Free SQL Tools from Idera

Free Ebook: Mastering Powershell


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!

Posted Mar 10 2011, 08:00 AM by ps1
Copyright 2012 PowerShell.com. All rights reserved.