< Back

Test-CRegistryKeyValue

Sun Jan 12, 2020 11:31 pm

NAME Test-CRegistryKeyValue



SYNOPSIS

Tests if a registry value exists.





SYNTAX

Test-CRegistryKeyValue [-Path] <String> [-Name] <String> [<CommonParameters>]





DESCRIPTION

The usual ways for checking if a registry value exists don't handle when a value simply has an empty or null

value. This function actually checks if a key has a value with a given name.





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:\\>Test-CRegistryKeyValue -Path 'hklm:\\Software\\Carbon\\Test' -Name 'Title'



Returns `True` if `hklm:\\Software\\Carbon\\Test` contains a value named 'Title'. `False` otherwise.











RELATED LINKS