Azure Automation Hybrid Worker "Failed to set folder access"

Josua 21 Reputation points
2020-11-12T14:21:35.633+00:00

Hello,

I am quite new to Azure Automation. At the moment I am trying to get a Hybrid Worker running my runbooks locally.

I have set up the hybrid worker group inside my automation account and also added the desired server to the group via the script that MS provides. I also updated the Microsoft Monitoring Agent to the latest version provided by Log Analytics.
It may also be relevant to note that I am trying to run the Hybrid Worker (HW) as a service user that I selected the credentials from the automation assets.

Everything seems fine so far. In the Event Viewer on the HW server I get all the 'started successfully' events in the Microsoft-SMA Operational Log.
39330-image.png

But when I try to run a simple PowerShell runbook

Write-Output $env:COMPUTERNAME  

on the HW, the runbook instance goes to a Suspended state.

On the HW I can see the following three events:
Event 15156
39461-image.png

Event 15181:
39297-image.png

Event 15106:
39366-image.png

At first it seemed to me that the RunAs user of my HW didn't have permission in the specified folder.
I checked and the user has full rights on the parent and all child folders.

I couldn't find anything specific about this problem on Google. Has anyone had a similar behaviour?

Appreciate your help!

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,187 questions
{count} votes

Accepted answer
  1. tbgangav-MSFT 10,421 Reputation points
    2020-11-16T15:36:43.833+00:00

    Hi @Josua ,

    In general, these https://learn.microsoft.com/en-us/azure/automation/troubleshoot/runbooks#diagnose-runbook-issues are the troubleshooting steps for suspended state.
    40181-image.png

    If the issue still persists even after trying those steps then as mitigation action or workaround can you try below options and see if issue gets resolved?

    • restart the hybrid worker server
    • increase memory of your hybrid server if possible
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Nitesh Pal 1 Reputation point Microsoft Employee
    2024-07-11T12:20:05+00:00

    It appears you are running this on a hybrid worker. Please ensure you have the correct version of PowerShell installed.

    The runbook code may require a higher version of PowerShell.

    For example, if your runbook was created using PowerShell 7.2 and the hybrid worker does not have version 7.2 installed, you might encounter this kind of issue.

    ~ Nitesh Pal

    0 comments No comments