Get-RegistryKeyValue

Gets the value from a registry key.

Syntax

Get-RegistryKeyValue [-Path] <String> [-Name] <String> [<CommonParameters>]

Description

PowerShell's Get-ItemProperty cmdlet is a pain to use. It doesn't actually return an object representing a registry key's value, but some other weird object that requires painful gyrations to get values from. This function returns just the value of a key.

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String

The path to the registry key where the value should be set. Will be created if it doesn't exist.

true false
Name String

The name of the value being set.

true false

EXAMPLE 1

Get-RegistryKeyValue -Path 'hklm:\Software\Carbon\Test' -Name 'Title'

Returns the value of the 'hklm:\Software\Carbon\Test' key's Title value.