Skip to content

Commit 9d5efdd

Browse files
committed
minor edit
1 parent 2254ba3 commit 9d5efdd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,21 @@ Invoke-AzRestMethod -Path "<ARC or Azure VM resourceId>/providers/Microsoft.Main
400400
}'
401401
```
402402
---
403+
## Remove machine from the schedule
404+
405+
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:
406+
407+
```kusto
408+
maintenanceresources
409+
| where type =~ "microsoft.maintenance/configurationassignments"
410+
| where properties.maintenanceConfigurationId =~ "<maintenance configuration Resource ID>"
411+
| where properties.resourceId =~ "<Machine Resource Id>"
412+
| project name, id
413+
```
414+
After you obtain the name from above, delete the configuration assignment by following the DELETE request -
415+
```rest
416+
DELETE on `<ARC or Azure VM resourceId>/providers/Microsoft.Maintenance/configurationAssignments/<configurationAssignment name>?api-version=2021-09-01-preview`
417+
```
403418

404419
## Next steps
405420

0 commit comments

Comments
 (0)