Trying to run a runbook (powershell) using hybrid worker group but getting error.

vicky mishra 0 Reputation points
2025-08-12T15:29:09.2533333+00:00

Trying to run a runbook (powershell) using hybrid worker group but getting error message.
The error I am getting is:-
"Job was suspended as the job limit for a hybrid worker exceeded. Add more hybrid workers to the hybrid worker group to overcome this issue, see: https://aka.ms.HRW-polling-limit exceed."

I have only 1 hybrid worker group and only 1 runbook that I am trying to run still getting this error. Attaching the image of the jobs that I ran. I need to know if I am able to connect to the server and run the job or not. Script I am trying to run is

# Create a PSCredential object using plain text (NOT recommended for production)
$username = "Some User Name"
$password = ConvertTo-SecureString "Some Password" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ($username, $password)

# Define the SCCM server name
$SCCMServer = "SCCM2" 

# Define the command to run remotely
$ScriptBlock = {
    $env:COMPUTERNAME
}

# Run the command on the SCCM server
Invoke-Command -ComputerName $SCCMServer -ScriptBlock $ScriptBlock -Credential $cred

jobs executing

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jose Benjamin Solis Nolasco 5,406 Reputation points
    2025-08-12T15:51:11.5433333+00:00

    @vicky mishra I hope you are doing well,

    On the worker VM: Check service Microsoft Hybrid Runbook Worker (must be running).

    Restart it if it’s stuck.

    Check logs at:

    C:\ProgramData\Microsoft\System Center\Orchestrator\RunbookService\Logs

    The “polling limit exceeded” means the worker missed Azure’s heartbeat schedule. This can happen if: The VM is low on CPU/RAM.

    There’s firewall/proxy delay in reaching *.azure-automation.net.

    1. Free up the current worker
      • Stop any stuck/suspended jobs in the portal.
      • Restart the Hybrid Runbook Worker service.
    2. Option 2: Add capacity
      • Add another VM to the same Hybrid Worker Group.
      • This spreads the job load and avoids single-worker bottlenecks.
    3. Option 3: Shorten job duration
      • Make the runbook modular so it finishes faster, freeing the worker.

    😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!


  2. Anurag Rohikar 600 Reputation points Microsoft External Staff Moderator
    2025-08-20T13:31:08.0466667+00:00

    Hello vicky mishra, Thanks for reaching out, and we appreciate your patience while we looked into this.

    From the screenshot you attached, we can see that the same runbook executes successfully when it runs on Azure but gets suspended when it targets your Hybrid Worker Group. This confirms that the runbook code itself is valid, and the issue lies specifically with the Hybrid Worker’s communication with Azure Automation.

    A few additional considerations beyond the guidance already shared:

    Connectivity vs. Execution: Since the job is being created on the Hybrid Worker, you are indeed able to connect to the server. The suspension is not caused by connectivity failure, but by the worker missing Azure’s required polling/heartbeat interval. Once the heartbeat issue is resolved, the same runbook should execute successfully.

    • Single-Worker Limitation: Even with one Hybrid Worker and one job, this error can occur if the VM experiences CPU or memory pressure or temporarily loses outbound connectivity. Azure Automation expects a consistent heartbeat, and any delay can trigger job suspension.
    • Monitoring Worker Health: Azure Automation provides a Hybrid Runbook Worker health feature that helps you track whether your worker is meeting heartbeat requirements and if there are any resource-related problems. Documentation: Monitor Hybrid Runbook Worker health. Scaling Out: If reliability is critical, consider adding another VM to the same Hybrid Worker Group. This allows Azure Automation to distribute jobs, which reduces the chance of a single node becoming a bottleneck.

    In summary, your connection to the Hybrid Worker server is functioning correctly. The suspension is due to missed heartbeat checks rather than connectivity or authentication issues. Once the worker service stability or capacity concerns are addressed, your runbook should execute as expected.

    I hope this helps clarify the issue. For further details, please refer to the Microsoft documentation:


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.