From adc897e7f33b99cd206c977bb40204fb51db2fa4 Mon Sep 17 00:00:00 2001 From: Jesper Fajers Date: Wed, 24 Apr 2024 19:43:01 +0000 Subject: [PATCH] Update --- src/internal/functions/Get-AzOpsResourceDefinition.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/functions/Get-AzOpsResourceDefinition.ps1 b/src/internal/functions/Get-AzOpsResourceDefinition.ps1 index e206b20f..59b67af4 100644 --- a/src/internal/functions/Get-AzOpsResourceDefinition.ps1 +++ b/src/internal/functions/Get-AzOpsResourceDefinition.ps1 @@ -293,8 +293,8 @@ } # Process Policies at Resource Group scope if (-not $SkipPolicy) { - if ($subscriptionsToIncludeResourceGroups) { - Get-AzOpsPolicy -ScopeObject $scopeObject -Subscription $subscriptions -SubscriptionsToIncludeResourceGroups $subscriptionsToIncludeResourceGroups -ResourceGroup -StatePath $StatePath + if ($newSubscriptionsToIncludeResourceGroups) { + Get-AzOpsPolicy -ScopeObject $scopeObject -Subscription $subscriptions -SubscriptionsToIncludeResourceGroups $newSubscriptionsToIncludeResourceGroups -ResourceGroup -StatePath $StatePath } else { Get-AzOpsPolicy -ScopeObject $scopeObject -Subscription $subscriptions -ResourceGroup -StatePath $StatePath