Tag: AzureAutomation

Azure

Encrypt All Azure Automation Variables

$ResourceGroupName = '' $AutomationAccountName = '' # Get all variables $variables = Get-AzureRMAutomationVariable -ResourceGroupName $ResourceGroupName -AutomationAccountName $AutomationAccountName # parse through each unencrypted variable Foreach($var in $variables | Where-Object{$_.Encrypted -ne $True}){ # remove the unencrypted variable Remove-AzureRMAutomationVariable -ResourceGroupName $var.ResourceGroupName -AutomationAccountName $var.AutomationAccountName -Name $var.Name # recreate the variable, with the same values and encrypt it New-AzureRMAutomationVariable -ResourceGroupName $var.ResourceGroupName -AutomationAccountName $var.AutomationAccountName -Name $var.Name...