Skip to main content

Posts

Showing posts from April, 2015

Google Search

Custom Search

Live Search

Yahoo Search


Search the web Search this site

Changing Registry Key Values using PowerShell

As you may be knowing, you can use Windows PowerShell to change registry values. In this article I am going to do five things.I have created few registry entries to use in this example as seen below. In real world you can use whatever entries in your registry. It is always advisable to backup your registry before changing it.1. Set a registry key value.To set a value you need to use the “Set-ItemProperty” cmdlet as below.Set-ItemProperty -Path "HKLM:\Software\Test\Live" -Name "TestValue2" –Value “TestData2”Above command will put “TestData2” in the registry key “TestValue2” located in HKEY_LOCAL_MACHINE\Software\Test\Live.2. Read a registry key value.Reading from the registry can be done by using the cmdlet “Get-ItemProperty”.Below command will get the value in the “TestValue1” key.Get-ItemProperty -Path "HKLM:\Software\Test\Live" -Name "TestValue1"3. Using variables in PowerShell.Here I am going to read a registry key value and put it to another…