Working with Azure PowerShell for bulk operations
Azure PowerShell is a complex and involved topic – in fact, it is a whole book in itself! What I wanted to do here, however, is to introduce to you one very useful command I use when I want to enable or disable every logic app in my resource group at the same time. I currently manage over 80 logic apps in some resource groups, so to do this manually means that the process is prone to error – I might miss one accidentally.
Exercise – enabling/disabling all logic apps in a resource group
Let's start with the code, then I will explain how it works:
1. param([string] $subscriptioname, [string] $resourcegroup, [string]$state) 2. Connect-AzureRmAccount 3. Get-AzureRmSubscription -SubscriptionName Visual Studio Enterprise Subscription | Select-AzureRmSubscription 4. Find-AzureRmResource -ResourceType "microsoft.Logic/workflows" -ResourceGroupNameContains " MatthewTestRG" | ForEach-Object...