Created
January 7, 2018 21:52
-
-
Save wsilveiranz/f4384c0335eedc1db64c92892a9cf419 to your computer and use it in GitHub Desktop.
Sets the state of all logic apps within a resource group.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string] $subscriptioname, [string] $resourcegroup, [string]$state) | |
Get-AzureRmSubscription -SubscriptionName $subscriptioname | Select-AzureRmSubscription | |
Find-AzureRmResource -ResourceGroupNameContains $resourcegroup -ResourceType Microsoft.Logic/workflows | ForEach-Object {Set-AzureRmLogicApp -ResourceGroupName $_.ResourceGroupName -Name $_.Name -State $state -Force} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save as Set-LogicAppsState.ps1
To execute you need AzureRm module, and need to be logged as a user that have at permissions on the subscription.
Usual execution looks like this:
Login-AzureRmAccount
.\Set-LogicAppsState.ps1 "MySubscription" "MyResourceGroup" "Enabled|Disabled"