Skip to content

Commit ca98a76

Browse files
authored
Merge pull request #206772 from Lukeout/patch-24
Update diagnostics-linux.md
2 parents 17ef083 + e60cfb3 commit ca98a76

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

articles/virtual-machines/extensions/diagnostics-linux.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@ Set-AzVMExtension -ResourceGroupName <resource_group_name> -VMName <vm_name> -Lo
131131

132132
---
133133

134+
### Enable auto update
135+
The **recommendation** is to enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../virtual-machines/automatic-extension-upgrade.md) feature, using the following PowerShell commands.
136+
# [Azure CLI](#tab/azcli)
137+
```powershell
138+
az vm extension set --publisher Microsoft.Azure.Diagnostics --name LinuxDiagnostic --version 4.0 --resource-group <resource_group_name> --vm-name <vm_name> --protected-settings ProtectedSettings.json --settings PublicSettings.json --enable-auto-upgrade true
139+
```
140+
# [Powershell](#tab/powershell)
141+
```powershellSet-AzVMExtension -ResourceGroupName <resource_group_name> -VMName <vm_name> -Location <vm_location> -ExtensionType LinuxDiagnostic -Publisher Microsoft.Azure.Diagnostics -Name LinuxDiagnostic -SettingString $publicSettings -ProtectedSettingString $protectedSettings -TypeHandlerVersion 4.0 -EnableAutomaticUpgrade $true
142+
```
143+
144+
---
145+
134146
### Sample installation
135147

136148
> [!NOTE]

0 commit comments

Comments
 (0)