Skip to content

Commit eb4cc37

Browse files
authored
Merge pull request #198896 from SnehaSudhirG/20May-git87249
Added example for Proxy server section
2 parents b9fcc39 + a126e06 commit eb4cc37

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

articles/automation/extension-based-hybrid-runbook-worker-install.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ If you use a proxy server for communication between Azure Automation and machine
6767
> [!NOTE]
6868
> You can set up the proxy settings by PowerShell cmdlets or API.
6969
70+
To install the extension using cmdlets:
71+
72+
1. Get the automation account details using the below API call.
73+
74+
```http
75+
GET https://westcentralus.management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}?api-version=2021-06-22
76+
77+
```
78+
79+
The API call will provide the value with the key: `AutomationHybridServiceUrl`. Use the URL in the next step to enable extension on the VM.
80+
81+
1. Install the Hybrid Worker Extension on the VM by running the following PowerShell cmdlet (Required module: Az.Compute). Use the `properties.automationHybridServiceUrl` provided by the above API call
82+
83+
7084
**Proxy server settings**
7185
# [Windows](#tab/windows)
7286

@@ -82,6 +96,17 @@ $protectedsettings = @{
8296
"ProxyPassword" = "password";
8397
};
8498
```
99+
**Azure VMs**
100+
101+
```powershell
102+
Set-AzVMExtension -ResourceGroupName <VMResourceGroupName> -Location <VMLocation> -VMName <VMName> -Name "HybridWorkerExtension" -Publisher "Microsoft.Azure.Automation.HybridWorker" -ExtensionType HybridWorkerForWindows -TypeHandlerVersion 0.1 -Settings $settings
103+
```
104+
105+
**Azure Arc-enabled VMs**
106+
107+
```powershell
108+
New-AzConnectedMachineExtension -ResourceGroupName <VMResourceGroupName> -Location <VMLocation> -VMName <VMName> -Name "HybridWorkerExtension" -Publisher "Microsoft.Azure.Automation.HybridWorker" -ExtensionType HybridWorkerForWindows -TypeHandlerVersion 0.1 -Settings $settings -NoWait
109+
```
85110

86111
# [Linux](#tab/linux)
87112

@@ -93,6 +118,18 @@ $settings = @{
93118
"AutomationAccountURL" = "<registration-url>/<subscription-id>";
94119
};
95120
```
121+
**Azure VMs**
122+
123+
```powershell
124+
Set-AzVMExtension -ResourceGroupName <VMResourceGroupName> -Location <VMLocation> -VMName <VMName> -Name "HybridWorkerExtension" -Publisher "Microsoft.Azure.Automation.HybridWorker" -ExtensionType HybridWorkerForLinux -TypeHandlerVersion 0.1 -Settings $settings
125+
```
126+
127+
**Azure Arc-enabled VMs**
128+
129+
```powershell
130+
New-AzConnectedMachineExtension -ResourceGroupName <VMResourceGroupName> -Location <VMLocation> -VMName <VMName> -Name "HybridWorkerExtension" -Publisher "Microsoft.Azure.Automation.HybridWorker" -ExtensionType HybridWorkerForLinux -TypeHandlerVersion 0.1 -Settings $settings -NoWait
131+
```
132+
96133
---
97134

98135
### Firewall use

0 commit comments

Comments
 (0)