Azure Update Manger - Cannot edit maintenance configurations that were created with Powershell

134 views Asked by At

When I create a maintenance configuration in Azure using the PowerShell command 'New-AzMaintenanceConfiguration', I encounter a problem if I later try to modify it through the Azure Portal Web interface.

Specifically, if for example I create a Maintenance Configuration with powershell - then later attempt to manually add or remove a KB (Knowledge Base) update to the 'exclusions' list in the Updates section of the schedule via the web interface, I am unable to save any changes.

This issue occurs only when the maintenance configuration is initially created with PowerShell.

In contrast, if the maintenance configuration is initially created using the Azure Portal Web interface, I can easily edit it later without any issues.

Is there any way to report this as a bug - if it is a bug, can anyone confirm this behavour? Thanks

Here's a sample Powershell to try:

$ResourceGroupName = "YOUR-RESOURCEGROUP-NAME"
$Name = "YOUR NAME"
$MaintenanceScope = "InGuestPatch"
$Location = "uksouth"
$StartDateTime = "2024-11-14 12:00"
$ExpirationDateTime = "2024-12-04 17:00"
$TimeZone = "GMT Standard Time"
$Duration = "03:00"
$RecurEvery = "Day"
$InstallPatchRebootSetting = "IfRequired"
$Visibility = "Custom"

# Assuming these are the classifications you want to include
$WindowParameterClassificationToInclude = "Critical", "Security", "UpdateRollup", "FeaturePack", "ServicePack", "Definition", "Tools", "Updates"

# Assuming these are the KB numbers you want to exclude
$WindowParameterKbNumberToExclude = "KB5002501", "KB5002517", "KB5002541"

# ExtensionProperty should be a hashtable
$ExtensionProperty = @{
    "InGuestPatchMode" = "User"
}

New-AzMaintenanceConfiguration `
-ResourceGroupName $ResourceGroupName `
-Name $Name `
-MaintenanceScope $MaintenanceScope `
-Location $Location `
-StartDateTime $StartDateTime `
-ExpirationDateTime $ExpirationDateTime `
-TimeZone $TimeZone `
-Duration $Duration `
-RecurEvery $RecurEvery `
-WindowParameterClassificationToInclude $WindowParameterClassificationToInclude `
-WindowParameterKbNumberToExclude $WindowParameterKbNumberToExclude `
-InstallPatchRebootSetting $InstallPatchRebootSetting `
-Visibility $Visibility `
-ExtensionProperty $ExtensionProperty `
-Debug
0

There are 0 answers