You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$GraphQuery="resources | where resourceGroup in ('$([String]::Join("','",$ResourceGroup))') and strlen(properties.definition.actions) < 123000 | summarize count()"
548
+
$GraphQuery="resources | where resourceGroup in ('$([String]::Join("','",$ResourceGroup))') and strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' | summarize count()"
549
549
$EnvSize= az graph query -q $GraphQuery--subscriptions $Subscri--output json --only-show-errors|ConvertFrom-Json
550
550
$EnvSizeNum=$EnvSize.data.'count_'
551
551
@@ -556,7 +556,7 @@ param ($TenantID,
556
556
$Limit=0
557
557
558
558
while ($Looper-lt$Loop) {
559
-
$GraphQuery="resources | where resourceGroup in ('$([String]::Join("','",$ResourceGroup))') and strlen(properties.definition.actions) < 123000 | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
559
+
$GraphQuery="resources | where resourceGroup in ('$([String]::Join("','",$ResourceGroup))') and strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
Write-Debug ('Extracting Resources from Subscription: '+$SubscriptionID+'. And from Tag: '+$TagKey+':'+$TagValue)
576
-
$GraphQuery="resources | where isnotempty(tags) | mvexpand tags | extend tagKey = tostring(bag_keys(tags)[0]) | extend tagValue = tostring(tags[tagKey]) | where tagKey == '$TagKey' and tagValue == '$TagValue' | where strlen(properties.definition.actions) < 123000 | summarize count()"
576
+
$GraphQuery="resources | where isnotempty(tags) | mvexpand tags | extend tagKey = tostring(bag_keys(tags)[0]) | extend tagValue = tostring(tags[tagKey]) | where tagKey == '$TagKey' and tagValue == '$TagValue' | where strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' | summarize count()"
577
577
$EnvSize= az graph query -q $GraphQuery--output json --subscriptions $Subscri--only-show-errors|ConvertFrom-Json
578
578
$EnvSizeNum=$EnvSize.data.'count_'
579
579
@@ -584,7 +584,7 @@ param ($TenantID,
584
584
$Limit=0
585
585
586
586
while ($Looper-lt$Loop) {
587
-
$GraphQuery="resources | where isnotempty(tags) | mvexpand tags | extend tagKey = tostring(bag_keys(tags)[0]) | extend tagValue = tostring(tags[tagKey]) | where tagKey == '$TagKey' and tagValue == '$TagValue' | where strlen(properties.definition.actions) < 123000 | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
587
+
$GraphQuery="resources | where isnotempty(tags) | mvexpand tags | extend tagKey = tostring(bag_keys(tags)[0]) | extend tagValue = tostring(tags[tagKey]) | where tagKey == '$TagKey' and tagValue == '$TagValue' | where strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
Write-Debug ('Extracting Resources from Subscription: '+$SubscriptionID+'.')
603
-
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 | summarize count()"
603
+
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' | summarize count()"
604
604
$EnvSize= az graph query -q $GraphQuery--output json --subscriptions $SubscriptionID--only-show-errors|ConvertFrom-Json
605
605
$EnvSizeNum=$EnvSize.data.'count_'
606
606
@@ -611,7 +611,7 @@ param ($TenantID,
611
611
$Limit=0
612
612
613
613
while ($Looper-lt$Loop) {
614
-
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
614
+
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
$GraphQueryExtension="| join kind=inner (resourcecontainers | where type == 'microsoft.resources/subscriptions' | mv-expand managementGroupParent = properties.managementGroupAncestorsChain | where managementGroupParent.name =~ '$ManagementGroup' | project subscriptionId, managanagementGroup = managementGroupParent.name) on subscriptionId"
631
631
}
632
-
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 $GraphQueryExtension | summarize count()"
632
+
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' $GraphQueryExtension | summarize count()"
$EnvSize= az graph query -q $GraphQuery--output json --only-show-errors|ConvertFrom-Json
@@ -642,7 +642,7 @@ param ($TenantID,
642
642
$Limit=0
643
643
644
644
while ($Looper-lt$Loop) {
645
-
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 $GraphQueryExtension | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
645
+
$GraphQuery="resources | where strlen(properties.definition.actions) < 123000 and type notcontains 'Microsoft.Logic/workflows' $GraphQueryExtension | project id,name,type,tenantId,kind,location,resourceGroup,subscriptionId,managedBy,sku,plan,properties,identity,zones,extendedLocation$($GraphQueryTags) | order by id asc"
0 commit comments