Remove-​Azure​Rm​Automation​Variable

Removes an Automation variable.

Syntax

Remove-AzureRmAutomationVariable
      [-ResourceGroupName] <String>
      [-AutomationAccountName] <String>
      [-Name] <String>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Remove-AzureRmAutomationVariable cmdlet removes a variable from Azure Automation.

Examples

Example 1: Remove a variable

PS C:\>Remove-AzureRmAutomationVariable -AutomationAccountName "Contoso17" -Name "StringVariable22" -Force -ResourceGroupName "ResourceGroup01"

This command removes a variable named StringVariable22 in the Automation account named Contoso17. This command specifies the Force parameter. Therefore, it does not prompt you for confirmation.

Required Parameters

-AutomationAccountName

Specifies the name of the Automation account that contains the variable that this cmdlet deletes.

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

Specifies the name of the variable that this cmdlet deletes.

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

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

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False