Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Set-AzAutomationVariable
- Module:
- Az.Automation Module
Modifies an Automation variable.
Syntax
UpdateVariableValue
Set-AzAutomationVariable
[-Name] <String>
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
-Encrypted <Boolean>
-Value <Object>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
UpdateVariableDescription
Set-AzAutomationVariable
[-Name] <String>
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
-Description <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzAutomationVariable cmdlet modifies the value or description of a variable in Azure Automation. To encrypt the variable, specify the Encrypted parameter. You cannot modify the encrypted state of a variable after creation. Specifying Encrypted for an existing, non-encrypted, variable fails.
Examples
Example 1: Set the value of a variable
Set-AzAutomationVariable -AutomationAccountName "Contoso17" -Name "StringVariable22" -ResourceGroupName "ResourceGroup01" -Value "New Value" -Encrypted $False
This command sets a new value for the variable named StringVariable22 in the Azure Automation account named Contoso17.
Parameters
-AutomationAccountName
Specifies the name of the Automation account in which the variable is stored.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-Description
Specifies a description for the variable.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Encrypted
Specifies whether cmdlet encrypts the value of the variable for storage.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of the variable that this cmdlet modifies.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Specifies the resource group for which this cmdlet modifies a variable.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Value
Specifies a value for the variable.
Parameter properties
| Type: | Object |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
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
String
Boolean
Object
Outputs
Variable
Related Links
Azure PowerShell
Feedback
Was this page helpful?
