- Use the command 'New-AzMaintenanceConfiguration' to create a maintenance configuration.
- Then, attempt to manually add or remove a KB to 'exclusions' in the Updates part of the schedule using the normal Azure Portal Web interface.
- The issues is - I'm unavble to save any changes to a maintenance configuration through the GUI if it’s been created using Powershell.
If the maintenance configuration is created using the Azure Portal web interface manually, this isn't a problem.
Any suggestions or workarounds? This is problematic bug.
Here's powershell sample:
$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