Set-​Azure​Rm​Automation​Variable

Modifies an Automation variable.

Syntax

Set-AzureRmAutomationVariable
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-Name] <String>
   -Description <String>
   [<CommonParameters>]
Set-AzureRmAutomationVariable
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-Name] <String>
   -Encrypted <Boolean>
   -Value <Object>
   [<CommonParameters>]

Description

The Set-AzureRmAutomationVariable 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

PS C:\>Set-AzureRmAutomationVariable -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.

Required Parameters

-AutomationAccountName

Specifies the name of the Automation account in which the variable is stored.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Description

Specifies a description for the variable.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Encrypted

Specifies whether cmdlet encrypts the value of the variable for storage.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies the name of the variable that this cmdlet modifies.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the resource group for which this cmdlet modifies a variable.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Value

Specifies a value for the variable.

Type:Object
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Automation.Model.Variable