Skip to content

Commit 2bafd7b

Browse files
authored
Merge pull request #104658 from BethWilke/task106
Fixing task 1667655
2 parents 855f92d + e0fd960 commit 2bafd7b

File tree

3 files changed

+58
-42
lines changed

3 files changed

+58
-42
lines changed

articles/automation/automation-hrw-run-runbooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ To use a managed identity for Azure resources on a Hybrid Runbook worker, you ne
8282
2. [Configure managed identities for Azure resources on your VM](../active-directory/managed-identities-azure-resources/qs-configure-portal-windows-vm.md#enable-system-assigned-managed-identity-on-an-existing-vm)
8383
3. [Grant your VM access to a resource group in Resource Manager](../active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-arm.md#grant-your-vm-access-to-a-resource-group-in-resource-manager)
8484
tutorial-windows-vm-access-arm.md#get-an-access-token-using-the-vms-system-assigned-managed-identity-and-use-it-to-call-azure-resource-manager)
85-
4. [Install the Windows Hybrid Runbook Worker](automation-windows-hrw-install.md#installing-the-windows-hybrid-runbook-worker) on the virtual machine.
85+
4. [Install the Windows Hybrid Runbook Worker](automation-windows-hrw-install.md) on the virtual machine.
8686

8787
Once the preceding steps are complete, you can use `Connect-AzureRmAccount -Identity` in the runbook to authenticate to Azure resources. This configuration reduces the need to use a Run As Account and manage the certificate for the Run As account.
8888

articles/automation/automation-update-management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ Having a machine registered for Update Management in more than one Log Analytics
6161

6262
### Supported client types
6363

64-
The following table lists the supported operating systems for update assessments. Patching requires a Hybrid Runbook Worker. For information on Hybrid Runbook Worker requirements, see the installation guides for installing a [Windows Hybrid Runbook Worker](automation-windows-hrw-install.md#installing-the-windows-hybrid-runbook-worker) and a [Linux Hybrid Runbook Worker](automation-linux-hrw-install.md#installing-a-linux-hybrid-runbook-worker).
64+
The following table lists the supported operating systems for update assessments. Patching requires a Hybrid Runbook Worker. For information on Hybrid Runbook Worker requirements, see the installation guides for installing a [Windows Hybrid Runbook Worker](automation-windows-hrw-install.md) and a [Linux Hybrid Runbook Worker](automation-linux-hrw-install.md#installing-a-linux-hybrid-runbook-worker).
6565

6666
|Operating system |Notes |
6767
|---------|---------|
6868
|Windows Server 2019 (Datacenter/Datacenter Core/Standard)<br><br>Windows Server 2016 (Datacenter/Datacenter Core/Standard)<br><br>Windows Server 2012 R2(Datacenter/Standard)<br><br>Windows Server 2012 ||
69-
|Windows Server 2008 R2 (RTM and SP1 Standard)| Update Management only supports performing assessments for this operating system, patching is not supported as the [Hybrid Runbook Worker](automation-windows-hrw-install.md#installing-the-windows-hybrid-runbook-worker) is not supported for Windows Server 2008 R2. |
69+
|Windows Server 2008 R2 (RTM and SP1 Standard)| Update Management only supports performing assessments for this operating system, patching is not supported as the [Hybrid Runbook Worker](automation-windows-hrw-install.md) is not supported for Windows Server 2008 R2. |
7070
|CentOS 6 (x86/x64) and 7 (x64) | Linux agents must have access to an update repository. Classification-based patching requires `yum` to return security data that CentOS doesn't have in its RTM releases. For more information on classification-based patching on CentOS, see [Update classifications on Linux](automation-view-update-assessments.md#linux-2). |
7171
|Red Hat Enterprise 6 (x86/x64) and 7 (x64) | Linux agents must have access to an update repository. |
7272
|SUSE Linux Enterprise Server 11 (x86/x64) and 12 (x64) | Linux agents must have access to an update repository. |

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

Lines changed: 55 additions & 39 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,33 +74,39 @@ 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
6978

70-
> [!NOTE]
71-
> 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.
79+
Open **Windows PowerShell** from the **Start** screen in Administrator mode.
7280

73-
```powershell-interactive
74-
.\New-OnPremiseHybridWorker.ps1 -AutomationAccountName <NameofAutomationAccount> -AAResourceGroupName <NameofResourceGroup>`
75-
-OMSResourceGroupName <NameofOResourceGroup> -HybridGroupName <NameofHRWGroup> `
76-
-SubscriptionId <AzureSubscriptionId> -WorkspaceName <NameOfLogAnalyticsWorkspace>
77-
```
81+
### 3. Run the PowerShell script
7882

79-
4. You're prompted to agree to install NuGet, and you're prompted to authenticate with your Azure credentials.
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.
8084

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.
85+
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.
8286

83-
### Manual deployment
87+
```powershell-interactive
88+
.\New-OnPremiseHybridWorker.ps1 -AutomationAccountName <NameofAutomationAccount> -AAResourceGroupName <NameofResourceGroup>`
89+
-OMSResourceGroupName <NameofOResourceGroup> -HybridGroupName <NameofHRWGroup> `
90+
-SubscriptionId <AzureSubscriptionId> -WorkspaceName <NameOfLogAnalyticsWorkspace>
91+
```
8492

85-
Perform the first two steps once for your Automation environment, and then repeat the remaining steps for each worker computer.
93+
### 4. Install NuGet
8694

87-
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../includes/azure-monitor-log-analytics-rebrand.md)]
95+
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).
96+
97+
### 5. Verify the deployment
98+
99+
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.
100+
101+
## Manual deployment
102+
103+
On the target machine, perform the first two steps once for your Automation environment. Then perform the remaining steps for each worker computer.
88104

89-
#### 1. Create a Log Analytics workspace
105+
### 1. Create a Log Analytics workspace
90106

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.
107+
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.
92108

93-
#### 2. Add the Automation solution to the Log Analytics workspace
109+
### 2. Add the Automation solution to the Log Analytics workspace
94110

95111
The Automation solution adds functionality for Azure Automation, including support for Hybrid Runbook Worker. When you add the solution to your Log Analytics workspace, it automatically pushes worker components to the agent computer that you will install in the next step.
96112

@@ -100,7 +116,7 @@ To add the **Automation** solution to your workspace, run the following PowerShe
100116
Set-AzOperationalInsightsIntelligencePack -ResourceGroupName <logAnalyticsResourceGroup> -WorkspaceName <LogAnalyticsWorkspaceName> -IntelligencePackName "AzureAutomation" -Enabled $true -DefaultProfile <IAzureContextContainer>
101117
```
102118

103-
#### 3. Install the Log Analytics agent for Windows
119+
### 3. Install the Log Analytics agent for Windows
104120

105121
The Log Analytics agent for Windows connects computers to an Azure Monitor Log Analytics workspace. When you install the agent on your computer and connect it to your workspace, it automatically downloads the components that are required for Hybrid Runbook Worker.
106122

@@ -114,42 +130,42 @@ Heartbeat
114130
| where TimeGenerated > ago(30m)
115131
```
116132

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.
133+
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.
118134

119-
#### 4. Install the runbook environment and connect to Azure Automation
135+
### 4. Install the runbook environment and connect to Azure Automation
120136

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.
137+
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.
122138

123-
Open a PowerShell session in Administrator mode and run the following commands to import the module:
139+
Open a PowerShell session in Administrator mode and run the following commands to import the module.
124140

125141
```powershell-interactive
126142
cd "C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\<version>\HybridRegistration"
127143
Import-Module .\HybridRegistration.psd1
128144
```
129145

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

132148
```powershell-interactive
133149
Add-HybridRunbookWorker –GroupName <String> -EndPoint <Url> -Token <String>
134150
```
135151

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.
152+
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.
137153

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

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.
156+
* 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.
157+
* For the *EndPoint* parameter, use the **URL** entry on the Manage Keys page.
158+
* For the *Token* parameter, use the **PRIMARY ACCESS KEY** entry on the Manage Keys page.
143159

144-
To receive detailed information about the installation, use the **-Verbose** switch with **Add-HybridRunbookWorker**.
160+
To receive detailed information about the installation, use the *-Verbose* switch with **Add-HybridRunbookWorker**.
145161

146-
#### 5. Install PowerShell modules
162+
### 5. Install PowerShell modules
147163

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.
164+
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.
149165

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).
166+
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).
151167

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).
168+
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/powershell/scripting/developer/module/installing-a-powershell-module?view=powershell-7).
153169

154170
## Next steps
155171

0 commit comments

Comments
 (0)