You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/update-center/manage-arc-enabled-servers-programmatically.md
+3-10Lines changed: 3 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,18 +43,11 @@ The format of the request body for version 2020-08-15 is as follows:
43
43
44
44
# [Azure PowerShell](#tab/powershell)
45
45
46
-
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
46
+
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod-Path](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
47
47
48
48
```azurepowershell
49
-
Invoke-AzRestMethod
50
-
-ResourceGroupName resourceGroupName
51
-
-Name "machineName"
52
-
-ResourceProviderName "Microsoft.HybridCompute"
53
-
-ResourceType "machines"
54
-
-ApiVersion 2020-08-15-preview
55
-
-Payload '{
56
-
}'
57
-
-Method POST
49
+
Invoke-AzRestMethod-Path
50
+
"/subscriptions/subscriptionId/resourceGroups/resourcegroupname/providers/Microsoft.HybridCompute/machines/machinename/assessPatches?api-version=2020-08-15-preview" -Payload '{}' -Method POST
Copy file name to clipboardExpand all lines: articles/update-center/manage-vms-programmatically.md
+10-43Lines changed: 10 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: This article tells how to use update management center (preview) in
4
4
ms.service: update-management-center
5
5
author: SnehaSudhirG
6
6
ms.author: sudhirsneha
7
-
ms.date: 04/21/2022
7
+
ms.date: 03/23/2023
8
8
ms.topic: conceptual
9
9
---
10
10
@@ -26,26 +26,19 @@ POST on `subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers
26
26
27
27
# [Azure CLI](#tab/cli)
28
28
29
-
To specify the POST request, you can use the Azure CLI [az rest](/cli/azure/reference-index#az_rest) command.
29
+
To specify the POST request, you can use the Azure CLI [az vm assess-patches](https://learn.microsoft.com/cli/azure/vm?view=azure-cli-latest#az-vm-assess-patches) command.
30
30
31
31
```azurecli
32
-
az rest --method post --url https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/virtualMachineName/assessPatches?api-version=2020-12-01
32
+
az vm assess-patches -g MyResourceGroup -n MyVm
33
33
```
34
34
35
+
35
36
# [Azure PowerShell](#tab/powershell)
36
37
37
-
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
38
+
To specify the POST request, you can use the Azure PowerShell [Invoke-AzVMPatchAssessment](https://learn.microsoft.com/powershell/module/az.compute/invoke-azvmpatchassessment?view=azps-9.5.0) cmdlet.
@@ -107,10 +100,10 @@ POST on 'subscriptions/{subscriptionId}/resourceGroups/acmedemo/providers/Micros
107
100
108
101
# [Azure CLI](#tab/azurecli)
109
102
110
-
To specify the POST request, you can use the Azure CLI [az rest](/cli/azure/reference-index#az_rest) command.
103
+
To specify the POST request, you can use the Azure CLI [az vm install-patches](https://learn.microsoft.com/cli/azure/vm?view=azure-cli-latest#az-vm-install-patches) command.
111
104
112
105
```azurecli
113
-
az rest --method post --url https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/virtualMachineName/installPatches?api-version=2020-12-01 @body.json
106
+
az vm install-patches -g MyResourceGroup -n MyVm --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-linux Critical
114
107
```
115
108
116
109
The format of the request body for version 2020-12-01 is as follows:
@@ -140,36 +133,10 @@ The format of the request body for version 2020-12-01 is as follows:
140
133
141
134
# [Azure PowerShell](#tab/azurepowershell)
142
135
143
-
To specify the POST request, you can use the Azure PowerShell [Invoke-AzRestMethod](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
136
+
To specify the POST request, you can use the Azure PowerShell [Invoke-AzVMInstallPatch](/powershell/module/az.accounts/invoke-azrestmethod) cmdlet.
0 commit comments