@@ -4,7 +4,7 @@ description: Define network settings and enable network isolation for Azure Moni
4
4
ms.topic : conceptual
5
5
author : shseth
6
6
ms.author : shseth
7
- ms.date : 10/14 /2022
7
+ ms.date : 11/01 /2022
8
8
ms.custom : references_region
9
9
ms.reviewer : shseth
10
10
@@ -54,37 +54,35 @@ The Azure Monitor Agent extensions for Windows and Linux can communicate either
54
54
# [ Windows VM] ( #tab/PowerShellWindows )
55
55
56
56
``` powershell
57
- $settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
58
- $protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
59
-
60
- Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.0 -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
57
+ $settingsString = '{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": true}}';
58
+ $protectedSettingsString = '{"proxy":{"username":"[username]","password": "[password]"}}';
59
+ Set-AzVMExtension -ExtensionName AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion <type-handler-version> -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
61
60
```
62
61
63
62
# [ Linux VM] ( #tab/PowerShellLinux )
64
63
65
64
``` powershell
66
- $settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
67
- $protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
68
-
69
- Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion 1.5 -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
65
+ $settingsString = '{"proxy":{"mode":"application","address":"http://[address]:[port]","auth": true}}';
66
+ $protectedSettingsString = '{"proxy":{"username":"[username]","password": "[password]"}}';
67
+ Set-AzVMExtension -ExtensionName AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -VMName <virtual-machine-name> -Location <location> -TypeHandlerVersion <type-handler-version> -SettingString $settingsString -ProtectedSettingString $protectedSettingsString
70
68
```
71
69
72
70
# [ Windows Arc-enabled server] ( #tab/PowerShellWindowsArc )
73
71
74
72
``` powershell
75
- $settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
76
- $protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
73
+ $settings = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
74
+ $protectedSettings = @{"proxy" = @{username = "[username]"; password = "[password]"}}
77
75
78
- New-AzConnectedMachineExtension -Name AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settingsString -ProtectedSetting $protectedSettingsString
76
+ New-AzConnectedMachineExtension -Name AzureMonitorWindowsAgent -ExtensionType AzureMonitorWindowsAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settings -ProtectedSetting $protectedSettings
79
77
```
80
78
81
79
# [ Linux Arc-enabled server] ( #tab/PowerShellLinuxArc )
82
80
83
81
``` powershell
84
- $settingsString = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
85
- $protectedSettingsString = @{"proxy" = @{username = "[username]"; password = "[password]"}}
82
+ $settings = @{"proxy" = @{mode = "application"; address = "http://[address]:[port]"; auth = "true"}}
83
+ $protectedSettings = @{"proxy" = @{username = "[username]"; password = "[password]"}}
86
84
87
- New-AzConnectedMachineExtension -Name AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settingsString -ProtectedSetting $protectedSettingsString
85
+ New-AzConnectedMachineExtension -Name AzureMonitorLinuxAgent -ExtensionType AzureMonitorLinuxAgent -Publisher Microsoft.Azure.Monitor -ResourceGroupName <resource-group-name> -MachineName <arc-server-name> -Location <arc-server-location> -Setting $settings -ProtectedSetting $protectedSettings
88
86
```
89
87
90
88
---
0 commit comments