You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/automation-windows-hrw-install.md
+44-27Lines changed: 44 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,15 @@ ms.topic: conceptual
8
8
---
9
9
# Deploy a Windows Hybrid Runbook Worker
10
10
11
-
You can use the Hybrid Runbook Worker feature of Azure Automation to run runbooks directly on the computer that's hosting the role and against resources in the environment to manage those local resources. Runbooks are stored and managed in Azure Automation and then delivered to one or more designated computers. This article describes how to install the Hybrid Runbook Worker on a Windows machine.
11
+
You can use the Hybrid Runbook Worker feature of Azure Automation to run runbooks directly on the computer that's hosting the role and against resources in the environment to manage those local resources. Runbooks are stored and managed in Azure Automation and then delivered to one or more designated computers. This article describes how to deploy the Hybrid Runbook Worker on a Windows machine.
12
+
13
+
After you successfully deploy a runbook worker, review [Run runbooks on a Hybrid Runbook Worker](automation-hrw-run-runbooks.md) to learn how to configure your runbooks to automate processes in your on-premises datacenter or other cloud environment.
## Windows Hybrid Runbook Worker installation and configuration
16
18
17
-
To install and configure a Windows Hybrid Runbook Worker, you can use one of the three following methods:
19
+
To install and configure a Windows Hybrid Runbook Worker, you can use one of the following methods.
18
20
19
21
* For Azure VMs, you install the Log Analytics agent for Windows using the [virtual machine extension for Windows](../virtual-machines/extensions/oms-windows.md). The extension installs the Log Analytics agent on Azure virtual machines, and enrolls virtual machines into an existing Log Analytics workspace using an Azure Resource Manager template or with PowerShell. Once the agent is installed, the VM can be added to a Hybrid Runbook Worker group in your Automation account following **step 4** under the [Manual deployment](#manual-deployment) section below.
20
22
@@ -25,6 +27,8 @@ To install and configure a Windows Hybrid Runbook Worker, you can use one of the
25
27
> [!NOTE]
26
28
> To manage the configuration of your servers that support the Hybrid Runbook Worker role with Desired State Configuration (DSC), you need to add them as DSC nodes.
27
29
30
+
### Minimum requirements for Windows Hybrid Runbook Worker
31
+
28
32
The minimum requirements for a Windows Hybrid Runbook Worker are:
29
33
30
34
* Windows Server 2012 or later
@@ -34,20 +38,26 @@ The minimum requirements for a Windows Hybrid Runbook Worker are:
34
38
* 4 GB of RAM
35
39
* Port 443 (outbound)
36
40
41
+
### Network configuration
42
+
37
43
To get more networking requirements for the Hybrid Runbook Worker, see [Configuring your network](automation-hybrid-runbook-worker.md#network-planning).
38
44
45
+
### Server onboarding for management with Automation DSC
46
+
39
47
For more information about onboarding servers for management with DSC, see [Onboarding machines for management by Azure Automation DSC](automation-dsc-onboarding.md).
40
48
If you enable the [Update Management solution](../operations-management-suite/oms-solution-update-management.md), any Windows computer that's connected to your Log Analytics workspace is automatically configured as a Hybrid Runbook Worker to support runbooks included in this solution. However, it isn't registered with any Hybrid Worker groups already defined in your Automation account.
41
49
50
+
### Adding the computer to a Hybrid Runbook Worker group
51
+
42
52
The computer can be added to a Hybrid Runbook Worker group in your Automation account to support Automation runbooks as long as you're using the same account for both the solution and the Hybrid Runbook Worker group membership. This functionality has been added to version 7.2.12024.0 of the Hybrid Runbook Worker.
43
53
44
-
After you successfully deploy a runbook worker, review [Run runbooks on a Hybrid Runbook Worker](automation-hrw-run-runbooks.md) to learn how to configure your runbooks to automate processes in your on-premises datacenter or other cloud environment.
54
+
## Automated deployment
45
55
46
-
### Automated deployment
56
+
On the target machine, perform the following steps to automate the installation and configuration of the Windows Hybrid Worker role.
47
57
48
-
Perform the following steps to automate the installation and configuration of the Windows Hybrid Worker role:
58
+
### 1. Download the PowerShell script
49
59
50
-
1.Download the New-OnPremiseHybridWorker.ps1 script from the
60
+
Download the New-OnPremiseHybridWorker.ps1 script from the
51
61
[PowerShell Gallery](https://www.powershellgallery.com/packages/New-OnPremiseHybridWorker) directly from the computer running the Hybrid Runbook Worker role or from another computer in your environment. Copy the script to the worker. The New-OnPremiseHybridWorker.ps1 script requires the following parameters during execution:
52
62
53
63
**AAResourceGroupName* (mandatory): The name of the resource group that's associated with your Automation account.
@@ -64,8 +74,13 @@ Perform the following steps to automate the installation and configuration of th
64
74
>
65
75
> For a list of the supported mapping pairs, see [Region mapping for Automation Account and Log Analytics workspace](how-to/region-mappings.md).
66
76
67
-
2. On your computer, open **Windows PowerShell** from the **Start** screen in Administrator mode.
68
-
3. From the PowerShell command-line shell, browse to the folder that contains the script that you downloaded. Change the values for the parameters *-AutomationAccountName*, *-AAResourceGroupName*, *-OMSResourceGroupName*, *-HybridGroupName*, *-SubscriptionId*, and *-WorkspaceName*. Then run the script.
77
+
### 2. Open Windows PowerShell command line shell
78
+
79
+
Open **Windows PowerShell** from the **Start** screen in Administrator mode.
80
+
81
+
### 3. Run the PowerShell script
82
+
83
+
From the PowerShell command line shell, browse to the folder that contains the script that you downloaded. Change the values for the parameters *-AutomationAccountName*, *-AAResourceGroupName*, *-OMSResourceGroupName*, *-HybridGroupName*, *-SubscriptionId*, and *-WorkspaceName*. Then run the script.
69
84
70
85
> [!NOTE]
71
86
> You're prompted to authenticate with Azure after you run the script. You *must* sign in with an account that's a member of the Subscription Admins role and co-administrator of the subscription.
@@ -76,19 +91,21 @@ Perform the following steps to automate the installation and configuration of th
4.You're prompted to agree to install NuGet, and you're prompted to authenticate with your Azure credentials.
94
+
### 4. Install NuGet
80
95
81
-
5. After the script is finished, the **Hybrid Worker Groups** page shows the new group and the number of members. If it's an existing group, the number of members is incremented. You can select the group from the list on the **Hybrid Worker Groups** page and select the **Hybrid Workers** tile. On the **Hybrid Workers** page, you see each member of the group listed.
96
+
You're prompted to agree to install NuGet, and to authenticate with your Azure credentials. If you don't have the latest NuGet version, you can obtain it from [Available NuGet Distribution Versions](https://www.nuget.org/downloads).
82
97
83
-
### Manual deployment
98
+
### 5. Verify the deployment
84
99
85
-
Perform the first two steps once for your Automation environment, and then repeat the remaining steps for each worker computer.
100
+
After the script is finished, the **Hybrid Worker Groups** page shows the new group and the number of members. If it's an existing group, the number of members is incremented. You can select the group from the list on the **Hybrid Worker Groups** page and select the **Hybrid Workers** tile. On the **Hybrid Workers** page, you see each member of the group listed.
On the target machine, perform the first two steps once for your Automation environment. Then perform the remaining steps for each worker computer.
88
105
89
106
#### 1. Create a Log Analytics workspace
90
107
91
-
If you don't already have a Log Analytics workspace, first review the [Azure Monitor Log design guidance](../azure-monitor/platform/design-logs-deployment.md) before you create a workspace.
108
+
If you don't already have a Log Analytics workspace, first review the [Azure Monitor Log design guidance](../azure-monitor/platform/design-logs-deployment.md) before you create a workspace.
92
109
93
110
#### 2. Add the Automation solution to the Log Analytics workspace
94
111
@@ -114,42 +131,42 @@ Heartbeat
114
131
| where TimeGenerated > ago(30m)
115
132
```
116
133
117
-
In the search results returned, you should see heartbeat records for the computer indicating it is connected and reporting to the service. The heartbeat record is forwarded from every agent by default to its assigned workspace. You can verify that the agent has correctly downloaded the Automation solution when it has a folder called **AzureAutomationFiles** in C:\Program Files\Microsoft Monitoring Agent\Agent. To confirm the version of the Hybrid Runbook Worker, browse to C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\ and note the \\*version* subfolder.
134
+
In the search results, you should see heartbeat records for the computer, indicating that it is connected and reporting to the service. By default, every agent forwards a heartbeat record to its assigned workspace. You can verify that the agent has correctly downloaded the Automation solution when it has a folder called AzureAutomationFiles in C:\Program Files\Microsoft Monitoring Agent\Agent. To confirm the version of the Hybrid Runbook Worker, browse to C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\ and note the \\*version* subfolder.
118
135
119
136
#### 4. Install the runbook environment and connect to Azure Automation
120
137
121
-
When you configure an agent to report to a Log Analytics workspace, the Automation solution pushes down the **HybridRegistration** PowerShell module, which contains the **Add-HybridRunbookWorker** cmdlet. You use this cmdlet to install the runbook environment on the computer and register it with Azure Automation.
138
+
When you configure an agent to report to a Log Analytics workspace, the Automation solution pushes down the HybridRegistration PowerShell module, which contains the **Add-HybridRunbookWorker** cmdlet. Use this cmdlet to install the runbook environment on the computer and register it with Azure Automation.
122
139
123
-
Open a PowerShell session in Administrator mode and run the following commands to import the module:
140
+
Open a PowerShell session in Administrator mode and run the following commands to import the module.
124
141
125
142
```powershell-interactive
126
143
cd "C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\<version>\HybridRegistration"
127
144
Import-Module .\HybridRegistration.psd1
128
145
```
129
146
130
-
Then run the **Add-HybridRunbookWorker** cmdlet by using the following syntax:
147
+
Then run the **Add-HybridRunbookWorker** cmdlet using the following syntax.
You can get the information required for this cmdlet from the **Manage Keys** page in the Azure portal. Open this page by selecting the **Keys** option from the **Settings** page in your Automation account.
153
+
You can get the information required for this cmdlet from the "Manage Keys" page in the Azure portal. Open this page by selecting the **Keys** option from the **Settings** page in your Automation account.
***GroupName** is the name of the Hybrid Runbook Worker group. If this group already exists in the Automation account, the current computer is added to it. If this group doesn't exist, it's added.
141
-
***EndPoint** is the **URL** entry on the **Manage Keys** page.
142
-
***Token** is the **PRIMARY ACCESS KEY** entry on the **Manage Keys** page.
157
+
*For the *GroupName* parameter, use the name of the Hybrid Runbook Worker group. If this group already exists in the Automation account, the current computer is added to it. If this group doesn't exist, it's added.
158
+
*For the *EndPoint* parameter, use the **URL** entry on the Manage Keys page.
159
+
*For the *Token* parameter, use the **PRIMARY ACCESS KEY** entry on the Manage Keys page.
143
160
144
-
To receive detailed information about the installation, use the **-Verbose** switch with **Add-HybridRunbookWorker**.
161
+
To receive detailed information about the installation, use the *-Verbose* switch with **Add-HybridRunbookWorker**.
145
162
146
163
#### 5. Install PowerShell modules
147
164
148
-
Runbooks can use any of the activities and cmdlets defined in the modules that are installed in your Azure Automation environment. These modules are not automatically deployed to on-premises computers, so you must install them manually. The exception is the Azure module, which is installed by default and provides access to cmdlets for all Azure services and activities for Azure Automation.
165
+
Runbooks can use any of the activities and cmdlets defined in the modules that are installed in your Azure Automation environment. These modules are not automatically deployed to on-premises computers, so you must install them manually. The exception is the Azure module. This module is installed by default and provides access to cmdlets for all Azure services and activities for Azure Automation.
149
166
150
-
Because the primary purpose of the Hybrid Runbook Worker feature is to manage local resources, you most likely need to install the modules that support these resources. For information on installing Windows PowerShell modules, see [Installing Modules](/powershell/scripting/developer/windows-powershell).
167
+
Because the primary purpose of the Hybrid Runbook Worker feature is to manage local resources, you most likely need to install the modules that support these resources, particularly the PowerShellGet module. For information on installing Windows PowerShell modules, see [Windows PowerShell](https://docs.microsoft.com/powershell/scripting/developer/windows-powershell).
151
168
152
-
Modules that are installed must be in a location referenced by the **PSModulePath**environment variable so that the hybrid worker can automatically import them. For more information, see [Modifying the PSModulePath Installation Path](/powershell/scripting/developer/windows-powershell).
169
+
Modules that are installed must be in a location referenced by the PSModulePathenvironment variable so that the hybrid worker can automatically import them. For more information, see [Install Modules in PSModulePath](https://docs.microsoft.com/en-us/powershell/scripting/developer/module/installing-a-powershell-module?view=powershell-7).
0 commit comments