IT Questions and Answers :)

Saturday, December 7, 2019

In PowerShell what cmdlet would you use to update a registry value

In PowerShell what cmdlet would you use to update a registry value

  • Set-ItemValue
  • Set-RegistryValue
  • Set-ItemProperty
  • Update-RegistryKey 
In PowerShell what cmdlet would you use to update a registry value

EXPLANATION

Modifying the value of a registry property value

To modify the value of a registry property value requires using the Set-PropertyItem cmdlet.
Only the steps…
Modifying the value of a registry property value:
  1. Use the Push-Location cmdlet to save the current working location.
  2. Use the Set-Location cmdlet to change to the appropriate registry drive.
  3. Use the Set-ItemProperty cmdlet to assign a new value to the registry property.
  4. Use the Pop-Location cmdlet to return to the original working location.
In the image that follows, a registry key named hsg exists in the HKCU:\Software hive. The registry key has a property named NewProperty.
Share:

0 comments:

Post a Comment

Popular Posts