Monthly Archive

Registry 5

Having seen how to read, change and delete keys – lets add some


$reg = [Microsoft.Win32.Registry]::LocalMachine
$key = $reg.CreateSubKey("Software\ITKE PSAdmins")
$key2 = $reg.CreateSubKey("Software\PSAM PSAdmins\Test")

Set the hive and call the CreateSubKey method.  Note the second example where we create a further depth of subkeys.  It isn’t necessary to create each step in the chain we can create the lot in one go

Leave a Reply