Set-PpRegistryValue
Set-PpRegistryValue
SYNOPSIS
Sets a registry value.
SYNTAX
__AllParameterSets
Set-PpRegistryValue [-RegRoot] <string> [-Datatype] <string> [-RegKey] <string> [-RegValue] <string>
[[-RegData] <string>] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Sets a registry value in the registry, if RegRoot is HKCU, the function will set the value for all users that have logged on to the unit and future users.
EXAMPLES
EXAMPLE 1
Set-PpRegistryValue -RegRoot “HKLM” -Datatype “String” -RegKey “SOFTWARE\CapaSystems” -RegValue “Test” -RegData “Test1”
EXAMPLE 2
Set-PpRegistryValue -RegRoot “HKCU” -Datatype “String” -RegKey “SOFTWARE\CapaSystems” -RegValue “Test” -RegData “Test1”
PARAMETERS
-Datatype
The datatype of the registry value, can be String, DWORD (32-bit) or Expanded String.
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: ''
-RegData
The data of the registry value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-RegKey
The path of the registry key.
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: ''
-RegRoot
The root of the registry key, can be HKLM, 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: ''
-RegValue
The name of the registry value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
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.