Skip to content

Commit a32fc38

Browse files
committed
Fixing tabs
1 parent 598e85b commit a32fc38

File tree

1 file changed

+27
-40
lines changed

1 file changed

+27
-40
lines changed

articles/azure-monitor/agents/azure-monitor-agent-manage.md

Lines changed: 27 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -134,52 +134,47 @@ Use the following CLI commands to install the Azure Monitor agent on Azure virtu
134134

135135
#### User-assigned managed identity
136136

137-
# [Windows](#tab/CLIWindows)
137+
**Windows**
138138

139139
```azurecli
140140
az vm extension set --name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true --settings '{"authentication":{"managedIdentity":{"identifier-name":"mi_res_id","identifier-value":"/subscriptions/<my-subscription-id>/resourceGroups/<my-resource-group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<my-user-assigned-identity>"}}}'
141141
```
142142

143-
# [Linux](#tab/CLILinux)
143+
**Linux**
144144

145145
```azurecli
146146
az vm extension set --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true --settings '{"authentication":{"managedIdentity":{"identifier-name":"mi_res_id","identifier-value":"/subscriptions/<my-subscription-id>/resourceGroups/<my-resource-group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<my-user-assigned-identity>"}}}'
147147
```
148148

149-
---
150-
151149
#### System-assigned managed identity
152150

153-
# [Windows](#tab/CLIWindows)
151+
**Windows**
154152

155153
```azurecli
156154
az vm extension set --name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true
157155
```
158156

159-
# [Linux](#tab/CLILinux)
157+
**Linux**
160158

161159
```azurecli
162160
az vm extension set --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --ids <vm-resource-id> --enable-auto-upgrade true
163161
```
164162

165-
---
166-
167163
### Install on Azure Arc-enabled servers
168164

169165
Use the following CLI commands to install the Azure Monitor agent on Azure Arc-enabled servers.
170166

171-
# [Windows](#tab/CLIWindowsArc)
167+
**Windows**
172168

173169
```azurecli
174170
az connectedmachine extension create --name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --type AzureMonitorWindowsAgent --machine-name <arc-server-name> --resource-group <resource-group-name> --location <arc-server-location> --enable-auto-upgrade true
175171
```
176172

177-
# [Linux](#tab/CLILinuxArc)
173+
**Linux**
178174

179175
```azurecli
180176
az connectedmachine extension create --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --type AzureMonitorLinuxAgent --machine-name <arc-server-name> --resource-group <resource-group-name> --location <arc-server-location> --enable-auto-upgrade true
181177
```
182-
---
183178

184179
#### [Resource Manager template](#tab/azure-resource-manager)
185180

@@ -240,70 +235,66 @@ To uninstall the Azure Monitor agent by using the Azure portal, go to your virtu
240235

241236
Use the following PowerShell commands to uninstall the Azure Monitor agent on Azure virtual machines.
242237

243-
# [Windows](#tab/PowerShellWindows)
238+
**Windows**
244239

245240
```powershell
246241
Remove-AzVMExtension -Name AzureMonitorWindowsAgent -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name>
247242
```
248-
# [Linux](#tab/PowerShellLinux)
243+
**Linux**
249244

250245
```powershell
251246
Remove-AzVMExtension -Name AzureMonitorLinuxAgent -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name>
252247
```
253-
---
254248

255249
### Uninstall on Azure Arc-enabled servers
256250

257251
Use the following PowerShell commands to uninstall the Azure Monitor agent on Azure Arc-enabled servers.
258252

259-
# [Windows](#tab/PowerShellWindowsArc)
253+
**Windows**
260254

261255
```powershell
262256
Remove-AzConnectedMachineExtension -MachineName <arc-server-name> -ResourceGroupName <resource-group-name> -Name AzureMonitorWindowsAgent
263257
```
264258

265-
# [Linux](#tab/PowerShellLinuxArc)
259+
**Linux**
266260

267261
```powershell
268262
Remove-AzConnectedMachineExtension -MachineName <arc-server-name> -ResourceGroupName <resource-group-name> -Name AzureMonitorLinuxAgent
269263
```
270-
---
271264

272265
#### [Azure CLI](#tab/azure-cli)
273266

274267
### Uninstall on Azure virtual machines
275268

276269
Use the following CLI commands to uninstall the Azure Monitor agent on Azure virtual machines.
277270

278-
# [Windows](#tab/CLIWindows)
271+
**Windows**
279272

280273
```azurecli
281274
az vm extension delete --resource-group <resource-group-name> --vm-name <virtual-machine-name> -name AzureMonitorWindowsAgent
282275
```
283276

284-
# [Linux](#tab/CLILinux)
277+
**Linux**
285278

286279

287280
```azurecli
288281
az vm extension delete --resource-group <resource-group-name> --vm-name <virtual-machine-name> -name AzureMonitorLinuxAgent
289282
```
290-
---
291283

292284
### Uninstall on Azure Arc-enabled servers
293285

294286
Use the following CLI commands to uninstall the Azure Monitor agent on Azure Arc-enabled servers.
295287

296-
# [Windows](#tab/CLIWindowsArc)
288+
**Windows**
297289

298290
```azurecli
299291
az connectedmachine extension delete --name AzureMonitorWindowsAgent --machine-name <arc-server-name> --resource-group <resource-group-name>
300292
```
301-
# [Linux](#tab/CLILinuxArc)
293+
**Linux**
302294

303295
```azurecli
304296
az connectedmachine extension delete --name AzureMonitorLinuxAgent --machine-name <arc-server-name> --resource-group <resource-group-name>
305297
```
306-
---
307298

308299
---
309300

@@ -323,47 +314,45 @@ To perform a one-time update of the agent, you must first uninstall the existing
323314

324315
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../virtual-machines/automatic-extension-upgrade.md) feature by using the following PowerShell commands.
325316

326-
# [Windows](#tab/PowerShellWindows)
317+
**Windows**
327318

328319
```powershell
329320
Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Publisher Microsoft.Azure.Monitor -ExtensionType AzureMonitorWindowsAgent -TypeHandlerVersion <version-number> -Location <location> -EnableAutomaticUpgrade $true
330321
```
331322

332-
# [Linux](#tab/PowerShellLinux)
323+
**Linux**
333324

334325
```powershell
335326
Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Publisher Microsoft.Azure.Monitor -ExtensionType AzureMonitorLinuxAgent -TypeHandlerVersion <version-number> -Location <location> -EnableAutomaticUpgrade $true
336327
```
337-
---
338328

339329
### Upgrade on Azure Arc-enabled servers
340330

341331
To perform a one-time upgrade of the agent, use the following PowerShell commands.
342332

343-
# [Windows](#tab/PowerShellWindowsArc)
333+
**Windows**
344334

345335
```powershell
346336
$target = @{"Microsoft.Azure.Monitor.AzureMonitorWindowsAgent" = @{"targetVersion"=<target-version-number>}}
347337
Update-AzConnectedExtension -ResourceGroupName $env.ResourceGroupName -MachineName <arc-server-name> -ExtensionTarget $target
348338
```
349339

350-
# [Linux](#tab/PowerShellLinuxArc)
340+
**Linux**
351341

352342
```powershell
353343
$target = @{"Microsoft.Azure.Monitor.AzureMonitorLinuxAgent" = @{"targetVersion"=<target-version-number>}}
354344
Update-AzConnectedExtension -ResourceGroupName $env.ResourceGroupName -MachineName <arc-server-name> -ExtensionTarget $target
355345
```
356-
---
357346

358347
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../azure-arc/servers/manage-automatic-vm-extension-upgrade.md#manage-automatic-extension-upgrade) feature by using the following PowerShell commands.
359348

360-
# [Windows](#tab/PowerShellWindowsArc)
349+
**Windows**
361350

362351
```powershell
363352
Update-AzConnectedMachineExtension -ResourceGroup <resource-group-name> -MachineName <arc-server-name> -Name AzureMonitorWindowsAgent -EnableAutomaticUpgrade
364353
```
365354

366-
# [Linux](#tab/PowerShellLinuxArc)
355+
**Linux**
367356

368357
```powershell
369358
Update-AzConnectedMachineExtension -ResourceGroup <resource-group-name> -MachineName <arc-server-name> -Name AzureMonitorLinuxAgent -EnableAutomaticUpgrade
@@ -378,49 +367,47 @@ To perform a one-time update of the agent, you must first uninstall the existing
378367

379368
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../virtual-machines/automatic-extension-upgrade.md) feature by using the following CLI commands.
380369

381-
# [Windows](#tab/CLIWindows)
370+
**Windows**
382371

383372
```azurecli
384373
az vm extension set -name AzureMonitorWindowsAgent --publisher Microsoft.Azure.Monitor --vm-name <virtual-machine-name> --resource-group <resource-group-name> --enable-auto-upgrade true
385374
```
386-
# [Linux](#tab/CLILinux)
375+
376+
**Linux**
387377

388378
```azurecli
389379
az vm extension set -name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --vm-name <virtual-machine-name> --resource-group <resource-group-name> --enable-auto-upgrade true
390380
```
391-
---
392381

393382
### Upgrade on Azure Arc-enabled servers
394383

395384
To perform a one-time upgrade of the agent, use the following CLI commands.
396385

397-
# [Windows](#tab/CLIWindowsArc)
386+
**Windows**
398387

399388
```azurecli
400389
az connectedmachine upgrade-extension --extension-targets "{\"Microsoft.Azure.Monitor.AzureMonitorWindowsAgent\":{\"targetVersion\":\"<target-version-number>\"}}" --machine-name <arc-server-name> --resource-group <resource-group-name>
401390
```
402391

403-
# [Linux](#tab/CLILinuxArc)
392+
**Linux**
404393

405394
```azurecli
406395
az connectedmachine upgrade-extension --extension-targets "{\"Microsoft.Azure.Monitor.AzureMonitorWindowsAgent\":{\"targetVersion\":\"<target-version-number>\"}}" --machine-name <arc-server-name> --resource-group <resource-group-name>
407396
```
408-
---
409397

410398
We recommend that you enable automatic update of the agent by enabling the [Automatic Extension Upgrade](../../azure-arc/servers/manage-automatic-vm-extension-upgrade.md#manage-automatic-extension-upgrade) feature by using the following PowerShell commands.
411399

412-
# [Windows](#tab/CLIWindowsArc)
400+
**Windows**
413401

414402
```azurecli
415403
az connectedmachine extension update --name AzureMonitorWindowsAgent --machine-name <arc-server-name> --resource-group <resource-group-name> --enable-auto-upgrade true
416404
```
417405

418-
# [Linux](#tab/CLILinuxArc)
406+
**Linux**
419407

420408
```azurecli
421409
az connectedmachine extension update --name AzureMonitorLinuxAgent --machine-name <arc-server-name> --resource-group <resource-group-name> --enable-auto-upgrade true
422410
```
423-
---
424411

425412
---
426413
<!-- streamline end -->

0 commit comments

Comments
 (0)