Remediation
From Azure Portal
- Go to
Virtual machines. - For each virtual machine, go to
Settings. - Click on
Extensions + applications. - If there are unapproved extensions, uninstall them.
From Azure CLI
From the audit command identify the unapproved extensions, and use the below CLI command to remove an unapproved extension attached to VM:
az vm extension delete --resource-group <resourceGroupName> --vm-name <vmName> --name <extensionName>
From PowerShell
For each VM and each insecure extension from the Audit Procedure run the following command:
Remove-AzVMExtension -ResourceGroupName <ResourceGroupName> -Name <ExtensionName> -VMName <VirtualMachineName>