Reg_ExistVariable
Reg_ExistVariable
SYNOPSIS
Exists a registry variable.
SYNTAX
__AllParameterSets
Reg_ExistVariable [-RegRoot] <string> [-RegKey] <string> [-RegVariable] <string>
[<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
This function checks if a registry variable exists at the specified path.
EXAMPLES
EXAMPLE 1
Reg_ExistVariable -RegRoot “HKLM” -RegKey “SOFTWARE\CapaSystems” -RegVariable “Test”
EXAMPLE 2
if (Reg_ExistVariable -RegRoot “HKLM” -RegKey “SOFTWARE\CapaSystems” -RegVariable “Test”) { Write-Host “The registry variable exists” } else { Write-Host “The registry variable does not exist” }
PARAMETERS
-RegKey
The path of the registry key.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-RegRoot
The root of the registry key, can be HKLM, HKEY_LOCAL_MACHINE, HKCU or HKU.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-RegVariable
The name of the registry variable.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
For more information, please visit https://capasystems.atlassian.net/wiki/spaces/CI65DOC/pages/19462455887/cs.Reg+ExistVariable