Skip to content

Commit 92c5a7f

Browse files
authored
Merge pull request #182525 from rpsqrd/patch-7
Add AzPS commands for automatic extension upgrades
2 parents 3fdce17 + b9827ea commit 92c5a7f

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

articles/azure-arc/servers/manage-automatic-vm-extension-upgrade.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Automatic Extension Upgrade (preview) for Azure Arc-enabled servers
33
description: Learn how to enable the Automatic Extension Upgrade (preview) for your Azure Arc-enabled servers.
44
ms.topic: conceptual
5-
ms.date: 11/06/2021
5+
ms.date: 12/09/2021
66
---
77

88
# Automatic Extension Upgrade (preview) for Azure Arc-enabled servers
@@ -16,7 +16,7 @@ Automatic Extension Upgrade (preview) is available for Azure Arc-enabled servers
1616
- Supported in all public cloud regions.
1717

1818
> [!NOTE]
19-
> In this release, only the Azure CLI is supported to configure Automatic Extension Upgrade.
19+
> In this release, it is only possible to configure Automatic Extension Upgrade with the Azure CLI and Azure PowerShell module.
2020
2121
## How does Automatic Extension Upgrade work?
2222

@@ -53,7 +53,7 @@ Automatic Extension Upgrade (preview) supports the following extensions (and mor
5353

5454
To enable Automatic Extension Upgrade (preview) for an extension, you must ensure the property `enable-auto-upgrade` is set to `true` and added to every extension definition individually.
5555

56-
Use the [az connectedmachine extension](/cli/azure/connectedmachine/extension) cmdlet with the `--name`, `--machine-name`, `--enable-auto-upgrade`, and `--resource-group` parameters.
56+
Use the [az connectedmachine extension update](/cli/azure/connectedmachine/extension) command with the `--name`, `--machine-name`, `--enable-auto-upgrade`, and `--resource-group` parameters.
5757

5858
```azurecli
5959
az connectedmachine extension update \
@@ -69,6 +69,19 @@ To check the status of Automatic Extension Upgrade (preview) for all extensions
6969
az connectedmachine extension list --resource-group resourceGroupName --machine-name machineName --query "[].{Name:name, AutoUpgrade:properties.enableAutoUpgrade}" --output table
7070
```
7171

72+
To enable Automatic Extension Upgrade (preview) for an extension using Azure PowerShell, use the [Update-AzConnectedMachineExtension](/powershell/module/az.connectedmachine/update-azconnectedmachineextension) cmdlet with the `-Name`, `-MachineName`, `-ResourceGroup`, and `-EnableAutomaticUpgrade` parameters.
73+
74+
```azurepowershell
75+
Update-AzConnectedMachineExtension -ResourceGroup resourceGroupName -MachineName machineName -Name DependencyAgentLinux -EnableAutomaticUpgrade
76+
```
77+
78+
To check the status of Automatic Extension Upgrade (preview) for all extensions on an Arc-enabled server, run the following command:
79+
80+
```azurepowershell
81+
Get-AzConnectedMachineExtension -ResourceGroup resourceGroupName -MachineName machineName | Format-Table Name, EnableAutomaticUpgrade
82+
```
83+
84+
7285
## Extension upgrades with multiple extensions
7386

7487
A machine managed by Arc-enabled servers can have multiple extensions with automatic extension upgrade enabled. The same machine can also have other extensions without automatic extension upgrade enabled.
@@ -81,7 +94,7 @@ To disable Automatic Extension Upgrade (preview) for an extension, you must ensu
8194

8295
### Using the Azure CLI
8396

84-
Use the [az connectedmachine extension ](/cli/azure/connectedmachine/extension) cmdlet with the `--name`, `--machine-name`, `--enable-auto-upgrade`, and `--resource-group` parameters.
97+
Use the [az connectedmachine extension update](/cli/azure/connectedmachine/extension) command with the `--name`, `--machine-name`, `--enable-auto-upgrade`, and `--resource-group` parameters.
8598

8699
```azurecli
87100
az connectedmachine extension update \
@@ -91,6 +104,14 @@ az connectedmachine extension update \
91104
--enable-auto-upgrade false
92105
```
93106

107+
### Using Azure PowerShell
108+
109+
Use the [Update-AzConnectedMachineExtension](/powershell/module/az.connectedmachine/update-azconnectedmachineextension) cmdlet with the `-Name`, `-MachineName`, `-ResourceGroup`, and `-EnableAutomaticUpgrade` parameters.
110+
111+
```azurepowershell
112+
Update-AzConnectedMachineExtension -ResourceGroup resourceGroupName -MachineName machineName -Name DependencyAgentLinux -EnableAutomaticUpgrade:$false
113+
```
114+
94115
## Next steps
95116

96117
- You can deploy, manage, and remove VM extensions using the [Azure CLI](manage-vm-extensions-cli.md), [PowerShell](manage-vm-extensions-powershell.md), or [Azure Resource Manager templates](manage-vm-extensions-template.md).

0 commit comments

Comments
 (0)