< Back

Get-CRegistryKeyValue

Sun Jan 12, 2020 9:52 pm

NAME Get-CRegistryKeyValue



SYNOPSIS

Gets the value from a registry key.





SYNTAX

Get-CRegistryKeyValue [-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

-Path <String>

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



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

The name of the value being set.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CRegistryKeyValue -Path 'hklm:\\Software\\Carbon\\Test' -Name 'Title'



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











RELATED LINKS