
Prerequisites
- A Log Analytics workspace
- Log Analytics agent
- Supported Windows operating system(Win 2012 above or win 7 above)
- Enable for management with Azure Automation State Configuration
Please note the below before creating the workspace and Automation account
The following table shows the supported mappings:
Log Analytics workspace region | Azure Automation region |
---|---|
US | |
EastUS1 | EastUS2 |
EastUS22 | EastUS |
WestUS2 | WestUS2 |
SouthCentralUS | SouthCentralUS |
WestCentralUS | WestCentralUS |
Canada | |
CanadaCentral | CanadaCentral |
Asia Pacific | |
AustraliaSoutheast | AustraliaSoutheast |
SoutheastAsia | SoutheastAsia |
CentralIndia | CentralIndia |
ChinaEast23 | ChinaEast2 |
JapanEast | JapanEast |
Europe | |
NorthEurope | NorthEurope |
FranceCentral | FranceCentral |
UKSouth | UKSouth |
WestEurope | WestEurope |
SwitzerlandNorth | SwitzerlandNorth |
US Gov | |
USGovVirginia | USGovVirginia |
USGovArizona3 | USGovArizona |
Create a automation account as shown below
In my example I have the log analytics workspace in East US and Automation account in East US2

Connect Azure Automation account with Log Analytics workspace
To link Azure Automation account with the Log Analytics workspace, we will need to enable Inventory and Change Tracking within Azure Automation.
- Click Automation Account
- Configuration Management -> Inventory, from Log Analytics workspace, select the desired workspace
- Click Enable

Valid if the settings is applied from Azure Automation should be linked to a Log Analytics workspace correctly

from the On premises server where you want to configure hybrid worker run powershell as admin and run this command
Install-Script -Name New-OnPremiseHybridWorker -RequiredVersion 1.0

Make sure to install the below modules.

Run the below commands and keep the below information handy and enter
New-OnPremiseHybridWorker.ps1 -WorkspaceName MSDNLABLOGANALYTICS -AutomationAccountName MSDNAutomationAcc -SubscriptionID YOURSUBSCRIPTIONID -HybridGroupName TechGenius -ResourceGroupName MSDNLABRG

Validate the Hybrid Worker as shown below.
