Skip to content

Commit f57a24d

Browse files
committed
Fixing task 1667655
1 parent e377376 commit f57a24d

File tree

1 file changed

+44
-27
lines changed

1 file changed

+44
-27
lines changed

articles/automation/automation-windows-hrw-install.md

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ ms.topic: conceptual
88
---
99
# Deploy a Windows Hybrid Runbook Worker
1010

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.
1214

1315
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../includes/azure-monitor-log-analytics-rebrand.md)]
1416

15-
## Installing the Windows Hybrid Runbook Worker
17+
## Windows Hybrid Runbook Worker installation and configuration
1618

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.
1820

1921
* 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.
2022

@@ -25,6 +27,8 @@ To install and configure a Windows Hybrid Runbook Worker, you can use one of the
2527
> [!NOTE]
2628
> 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.
2729
30+
### Minimum requirements for Windows Hybrid Runbook Worker
31+
2832
The minimum requirements for a Windows Hybrid Runbook Worker are:
2933

3034
* Windows Server 2012 or later
@@ -34,20 +38,26 @@ The minimum requirements for a Windows Hybrid Runbook Worker are:
3438
* 4 GB of RAM
3539
* Port 443 (outbound)
3640

41+
### Network configuration
42+
3743
To get more networking requirements for the Hybrid Runbook Worker, see [Configuring your network](automation-hybrid-runbook-worker.md#network-planning).
3844

45+
### Server onboarding for management with Automation DSC
46+
3947
For more information about onboarding servers for management with DSC, see [Onboarding machines for management by Azure Automation DSC](automation-dsc-onboarding.md).
4048
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.
4149

50+
### Adding the computer to a Hybrid Runbook Worker group
51+
4252
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.
4353

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
4555

46-
### Automated deployment
56+
On the target machine, perform the following steps to automate the installation and configuration of the Windows Hybrid Worker role.
4757

48-
Perform the following steps to automate the installation and configuration of the Windows Hybrid Worker role:
58+
### 1. Download the PowerShell script
4959

50-
1. Download the New-OnPremiseHybridWorker.ps1 script from the
60+
Download the New-OnPremiseHybridWorker.ps1 script from the
5161
[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:
5262

5363
* *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
6474
>
6575
> For a list of the supported mapping pairs, see [Region mapping for Automation Account and Log Analytics workspace](how-to/region-mappings.md).
6676
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.
6984

7085
> [!NOTE]
7186
> 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
7691
-SubscriptionId <AzureSubscriptionId> -WorkspaceName <NameOfLogAnalyticsWorkspace>
7792
```
7893

79-
4. You're prompted to agree to install NuGet, and you're prompted to authenticate with your Azure credentials.
94+
### 4. Install NuGet
8095

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).
8297

83-
### Manual deployment
98+
### 5. Verify the deployment
8499

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.
86101

87-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../includes/azure-monitor-log-analytics-rebrand.md)]
102+
## Manual deployment
103+
104+
On the target machine, perform the first two steps once for your Automation environment. Then perform the remaining steps for each worker computer.
88105

89106
#### 1. Create a Log Analytics workspace
90107

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.
92109

93110
#### 2. Add the Automation solution to the Log Analytics workspace
94111

@@ -114,42 +131,42 @@ Heartbeat
114131
| where TimeGenerated > ago(30m)
115132
```
116133

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.
118135

119136
#### 4. Install the runbook environment and connect to Azure Automation
120137

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.
122139

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.
124141

125142
```powershell-interactive
126143
cd "C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\<version>\HybridRegistration"
127144
Import-Module .\HybridRegistration.psd1
128145
```
129146

130-
Then run the **Add-HybridRunbookWorker** cmdlet by using the following syntax:
147+
Then run the **Add-HybridRunbookWorker** cmdlet using the following syntax.
131148

132149
```powershell-interactive
133150
Add-HybridRunbookWorker –GroupName <String> -EndPoint <Url> -Token <String>
134151
```
135152

136-
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.
137154

138155
!["Manage Keys" page](media/automation-hybrid-runbook-worker/elements-panel-keys.png)
139156

140-
* **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.
143160

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**.
145162

146163
#### 5. Install PowerShell modules
147164

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.
149166

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).
151168

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 PSModulePath environment 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).
153170

154171
## Next steps
155172

0 commit comments

Comments
 (0)