sns Kindly execute the below command before executing the above query. The variable can take input values either User or Platform. Update based on your requirement.
$ht = @{inGuestPatchMode="User"}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to create a mainteanance configuration, But it is failing at the following parameters in the command. Please suggest
I have done debug, following is the error
Command I have used:
$me=New-AzMaintenanceConfiguration -ResourceGroupName Ue2LuStgResourceGroup -Name workervms -MaintenanceScope InGuestPatch -Location EastUS2 -StartDateTime "2023-11-14 12:00" -ExpirationDateTime "2023-12-04 17:00" -Timezone "Eastern Standard Time" -Duration 03:00 -RecurEvery Day -ExtensionProperty $ht -InstallPatchRebootSetting "IfRequired" -Visibility Custom -Debug
Below is the error what exactly and where to add in guest patch mode or platform, and can amend and share, thanks
Error:
Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-request-id : d963f309-a8b1-4900-a1a2-6431b53b7c21
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id : d963f309-a8b1-4900-a1a2-6431b53b7c21
x-ms-routing-request-id : EASTUS:20231114T041916Z:d963f309-a8b1-4900-a1a2-6431b53b7c21
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Date : Tue, 14 Nov 2023 04:19:16 GMT
Body:
{
"Message": "Extension properties must contain Patch mode. e.g. InGuestPatchMode = 'User' or InGuestPatchMode = 'Platform',Windows/Linux patch configuration is missing"
}
DEBUG: 4:19:16 AM - [ConfigManager] Got nothing from [DisableErrorRecordsPersistence], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 4:19:16 AM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
New-AzMaintenanceConfiguration: Operation returned an invalid status code 'BadRequest'
DEBUG: 4:19:16 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 4:19:16 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 4:19:16 AM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: AzureQoSEvent: Module: Az.Maintenance:1.3.1; CommandName: New-AzMaintenanceConfiguration; PSVersion: 7.3.8; IsSuccess: False; Duration: 00:00:04.5203904; Exception: Operation returned an invalid status code 'BadRequest';
DEBUG: 4:19:16 AM - NewAzureRmMaintenanceConfiguration end processing.cn
sns Kindly execute the below command before executing the above query. The variable can take input values either User or Platform. Update based on your requirement.
$ht = @{inGuestPatchMode="User"}