Updating to release 2024-04-12
No post-update action is required if you wish to continue using the notification assets deployed by the ALZ pattern.
Complete the activities documented in the Steps to update to the latest release page.
If you are updating to release 2024-04-12, you may need to run a post-update script to remove the notification assets deployed by the ALZ pattern. This is necessary only if you have chosen to use existing action groups and alert processing rules. In such cases, the Service Health alerts will be reconfigured to use your action groups according to the Bring Your Own Notifications (BYON) feature.
To execute the script, follow these steps:
- Open PowerShell.
- Install the Az.ResourceGraph module if it is not already installed by running:
Install-Module Az.ResourceGraph
. - Navigate to the directory containing the Remove-AMBANotificationAssets.ps1 script.
- Set the $pseudoRootManagementGroup variable using the following command:
$pseudoRootManagementGroup = "The pseudo root management group ID parenting the identity, management and connectivity management groups"
Sign in to your Azure account using the
Connect-AzAccount
command. Ensure that the account has the necessary permissions to remove Policy Assignments, Policy Definitions, and resources at the required Management Group scope.Run the script with one of the following options:
To execute the PowerShell scripts provided in the ALZ pattern, you may need to temporarily modify the execution policy if it is not set to Unrestricted. Check the current execution policy by running the following command:
Get-ExecutionPolicy
If the execution policy is not Unrestricted, change it to Unrestricted by running:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
After executing your scripts, you can revert the execution policy to its original setting if needed.
Show output of what would happen if deletes executed:
./Remove-AMBANotificationAssets.ps1 -pseudoRootManagementGroup $pseudoRootManagementGroup -WhatIf
Execute the script asking for confirmation before deleting notification asset resources deployed by AMBA-ALZ:
./Remove-AMBANotificationAssets.ps1 -pseudoRootManagementGroup $pseudoRootManagementGroup
Execute the script without asking for confirmation before deleting notification asset resources deployed by AMBA-ALZ.
./Remove-AMBANotificationAssets.ps1 -pseudoRootManagementGroup $pseudoRootManagementGroup -Confirm:$false