Skip to content

Commit 2254ba3

Browse files
committed
edited the property in code and added a new section
1 parent 7e1291b commit 2254ba3

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

articles/update-center/manage-arc-enabled-servers-programmatically.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article tells how to use Update management center (preview) us
44
ms.service: update-management-center
55
author: SnehaSudhirG
66
ms.author: sudhirsneha
7-
ms.date: 04/21/2022
7+
ms.date: 02/20/2023
88
ms.topic: conceptual
99
---
1010

@@ -223,7 +223,9 @@ PUT on '/subscriptions/0f55bb56-6089-4c7e-9306-41fb78fc5844/resourceGroups/atsca
223223
"location": "eastus2euap",
224224
"properties": {
225225
"namespace": null,
226-
"extensionProperties": {},
226+
"extensionProperties": {
227+
"InGuestPatchMode" : "User"
228+
},
227229
"maintenanceScope": "InGuestPatch",
228230
"maintenanceWindow": {
229231
"startDateTime": "2021-08-21 01:18",
@@ -267,7 +269,9 @@ The format of the request body is as follows:
267269
"location": "eastus2euap",
268270
"properties": {
269271
"namespace": null,
270-
"extensionProperties": {},
272+
"extensionProperties": {
273+
"InGuestPatchMode": "User"
274+
},
271275
"maintenanceScope": "InGuestPatch",
272276
"maintenanceWindow": {
273277
"startDateTime": "2021-08-21 01:18",
@@ -307,7 +311,9 @@ Invoke-AzRestMethod -Path "/subscriptions/<subscriptionId>/resourceGroups/<resou
307311
"location": "eastus2euap",
308312
"properties": {
309313
"namespace": null,
310-
"extensionProperties": {},
314+
"extensionProperties": {
315+
"InGuestPatchMode" : "User"
316+
},
311317
"maintenanceScope": "InGuestPatch",
312318
"maintenanceWindow": {
313319
"startDateTime": "2021-12-21 01:18",

articles/update-center/manage-vms-programmatically.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,21 @@ Invoke-AzRestMethod -Path "<ARC or Azure VM resourceId>/providers/Microsoft.Main
392392
}'
393393
```
394394
---
395+
## Remove machine from the schedule
396+
397+
To remove a machine from the schedule, get all the configuration assignment names for the machine that were created to associate the machine with the current schedule from the Azure Resource Graph as listed below:
398+
399+
```kusto
400+
maintenanceresources
401+
| where type =~ "microsoft.maintenance/configurationassignments"
402+
| where properties.maintenanceConfigurationId =~ "<maintenance configuration Resource ID>"
403+
| where properties.resourceId =~ "<Machine Resource Id>"
404+
| project name, id
405+
```
406+
After you obtain the name from above, delete the configuration assignment by following the DELETE request -
407+
```rest
408+
DELETE on `<ARC or Azure VM resourceId>/providers/Microsoft.Maintenance/configurationAssignments/<configurationAssignment name>?api-version=2021-09-01-preview`
409+
```
395410

396411
## Next steps
397412

0 commit comments

Comments
 (0)