Lets look at changing registry values. In http://msmvps.com/blogs/richardsiddaway/archive/2010/07/16/registry-1.aspx I showed how to read the registry. We’ll change the 4 values we found in that post
Open the key as we did before except this time add a second parameter. $true indicates that the key is opened in a readable state. The SetValue method can be used to set the appropriate values. The parameters are the name of the value, the new value and the data type. Notice that for the multi-string value we supply and array of strings.
The acceptable data types are:
PS> Get-Enum Microsoft.Win32.RegistryValueKind