Set-AzAutomationVariable
Modifies an Automation variable.
Syntax
Set-AzAutomationVariable
[-Name] <String>
-Encrypted <Boolean>
-Value <Object>
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-AzAutomationVariable
[-Name] <String>
-Description <String>
[-ResourceGroupName] <String>
[-AutomationAccountName] <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.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
Specifies a description for the variable.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Encrypted
Specifies whether cmdlet encrypts the value of the variable for storage.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the variable that this cmdlet modifies.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the resource group for which this cmdlet modifies a variable.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Value
Specifies a value for the variable.
Type: | Object |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Outputs
Related Links
Azure PowerShell