Recently we had a request to update a whole stack of servers registry keys. With PowerShell this is easy to do.
In the first step you need to set the location of where you want to work. In this case it was HKLM:\SOFTWARE\Location – Location being where you want to update the key. The command for this would be:
- Set-Location “HKLM:\SOFTWARE\Location” (note the inverted commas)
Then we need to get the property values of the path, you can do this running this command:
- Get-ItemProperty -Path .
This lists all the keys.
Now we can finally change the value of the key. To do this you can run the following command:
- Set-ItemProperty -Path . -Name “Name of key” -Value “Value details”
There you have it, simple enough to update.
Hope it helps.