Posts

Showing posts from October, 2026

Hybrid Worker Service from Azure on a local [on-premise] machine

Image
  To run a Hybrid Worker Service from Azure on a local on-premise machine.   If you want to use an Azure Automation account with a credential from on-premise AD, you have to do quite a few tricks to give the on-premise AD account enough access rights so the HybridWorkerService can actually use and run it.   Do this by granting the on-premise account access to the AzureConnectedMachineAgent Tokens:-   icacls "C:\ProgramData\AzureConnectedMachineAgent\Tokens" `     /grant "<COMPANY\serviceAccountName>:(OI)(CI)(R)" /T   $Account = ‘<COMPANY\serviceAccountName>’ $Keys = @(     @{Path='HKLM:\SYSTEM\CurrentControlSet\Services\EventLog'; Rights='ReadKey'},     @{Path='HKLM:\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters'; Rights='FullControl'},     @{Path='HKLM:\SOFTWARE\Microsoft\Wbem\CIMOM'; Rights='FullControl'},     @{Path='HKLM:\SOFTWARE\Polici...