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
VERBOSE: Populating RepositorySourceLocation property for module Az.Resources.
VERBOSE: Populating RepositorySourceLocation property for module Az.ResourceGraph.
VERBOSE: Populating RepositorySourceLocation property for module Az.ManagedServiceIdentity.
Found '12' management group(s) (including the parent one) which are part of the 'redacted' management group hierarchy, to be queried for AMBA-ALZ resources.
Select-Object: /redacted/azure-monitor-baseline-alerts/patterns/alz/scripts/Start-AMBA-ALZ-Maintenance.ps1:157
Line |
157 | … s $managementGroups.mgName | Select-Object -ExpandProperty Id | Sort- …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Property "Id" cannot be found.
Added debugging to the script, it seems there is an issue with batching:
PS /Users/redacted/Projects/redacted/redacted_LZ/AMBA> ./Start-AMBA-ALZ-Maintenance-DEBUG.ps1 -pseudoRootManagementGroup $pseudoRootManagementGroup -cleanItems Amba-Alz -WhatIf -Verbose
VERBOSE: Populating RepositorySourceLocation property for module Az.Resources.
VERBOSE: Populating RepositorySourceLocation property for module Az.ResourceGraph.
VERBOSE: Populating RepositorySourceLocation property for module Az.ManagedServiceIdentity.
DEBUG: About to retrieve all management groups for: redacted
DEBUG: 1 MG(s) returned from Get-AzManagementGroup
DEBUG: Iterating MG redacted
DEBUG: Iterating MG redacted-platform
DEBUG: Iterating MG redacted-management
DEBUG: Iterating MG redacted-connectivity
DEBUG: Iterating MG redacted-identity
DEBUG: Iterating MG redacted-decommissioned
DEBUG: Iterating MG redacted-landing-zones
DEBUG: Iterating MG redacted-corp
DEBUG: Iterating MG redacted-ai
DEBUG: Iterating MG redacted-data
DEBUG: Iterating MG redacted-online
DEBUG: Iterating MG redacted-sandboxes
Found '12' management group(s) (including the parent one) which are part of the 'redacted' management group hierarchy, to be queried for AMBA-ALZ resources.
DEBUG: Full managementGroups array content:
mgName : redacted
mgId : /providers/Microsoft.Management/managementGroups/redacted
mgName : redacted-platform
mgId : /providers/Microsoft.Management/managementGroups/redacted-platform
mgName : redacted-management
mgId : /providers/Microsoft.Management/managementGroups/redacted-management
mgName : redacted-connectivity
mgId : /providers/Microsoft.Management/managementGroups/redacted-connectivity
mgName : redacted-identity
mgId : /providers/Microsoft.Management/managementGroups/redacted-identity
mgName : redacted-decommissioned
mgId : /providers/Microsoft.Management/managementGroups/redacted-decommissioned
mgName : redacted-landing-zones
mgId : /providers/Microsoft.Management/managementGroups/redacted-landing-zones
mgName : redacted-corp
mgId : /providers/Microsoft.Management/managementGroups/redacted-corp
mgName : redacted-ai
mgId : /providers/Microsoft.Management/managementGroups/redacted-ai
mgName : redacted-data
mgId : /providers/Microsoft.Management/managementGroups/redacted-data
mgName : redacted-online
mgId : /providers/Microsoft.Management/managementGroups/redacted-online
mgName : redacted-sandboxes
mgId : /providers/Microsoft.Management/managementGroups/redacted-sandboxes
DEBUG: CleanItems = Amba-Alz
DEBUG: Entering Get-ALZ-Alerts
DEBUG: Query used: Resources | where type in~ ('Microsoft.Insights/metricAlerts','Microsoft.Insights/activityLogAlerts', 'Microsoft.Insights/scheduledQueryRules') and tags['_deployed_by_amba'] =~ 'True' | project id
DEBUG: Entering Search-AzGraphRecursive
DEBUG: Query = Resources | where type in~ ('Microsoft.Insights/metricAlerts','Microsoft.Insights/activityLogAlerts', 'Microsoft.Insights/scheduledQueryRules') and tags['_deployed_by_amba'] =~ 'True' | project id
DEBUG: Management Groups to query = redacted, redacted-platform, redacted-management, redacted-connectivity, redacted-identity, redacted-decommissioned, redacted-landing-zones, redacted-corp, redacted-ai, redacted-data, redacted-online, redacted-sandboxes
DEBUG: More than 10 MGs, batching requests...
DEBUG: Querying batch: redacted, redacted-platform, redacted-management, redacted-connectivity, redacted-identity, redacted-decommissioned, redacted-landing-zones, redacted-corp, redacted-ai, redacted-data
DEBUG: Batch returned 0 items.
DEBUG: Querying batch: redacted-online, redacted-sandboxes
DEBUG: Batch returned 0 items.
DEBUG: Exiting Search-AzGraphRecursive
Select-Object: /Users/redacted/Projects/redacted/redacted_LZ/AMBA/Start-AMBA-ALZ-Maintenance-DEBUG.ps1:178
Line |
178 | … s $managementGroups.mgName | Select-Object -ExpandProperty Id | Sort- …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Property "Id" cannot be found.
Issue occurs on main branch at time of writing, and on 2024-12-10 release
The text was updated successfully, but these errors were encountered:
I still can't run the Start-AMBA-ALZ-Maintenance.ps1 script. I get the same output of Found '#' management group(s) (including the parent one) which are part of the 'MGMT_GRP' management group hierarchy, to be queried for AMBA-ALZ resources.
Glad to see someone else has the same type of issue.
Check for previous/existing GitHub issues
Issue Type?
Bug
Description
Running the following command to cleanup AMBA deployment:
Terminal output:
Added debugging to the script, it seems there is an issue with batching:
Issue occurs on main branch at time of writing, and on 2024-12-10 release
The text was updated successfully, but these errors were encountered: