Is there a way to delete a stale machine worker from a Hybrid Worker Group in Azure automation account?

Martin Gospodinov 6 Reputation points
2021-01-16T11:04:05.14+00:00

Hello. I have inherited the following situation :

Azure Automation account with Hybrid Worker Group and a single Hybrid Worker inside. The machine on which this worker was installed has been decommissioned and doesn't exist anymore. The problem is that it's name is still present in the Hybrid Worker group in Azure. The GUI doesn't provide me with a way to delete just the worker. I can only delete the whole group. Is there a way to delete only that stale worker machine and preserve the group?

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

3 answers

Sort by: Most helpful
  1. Andreas Baumgarten 100.1K Reputation points MVP
    2021-01-16T11:53:22.983+00:00

    Maybe this helps:

    https://learn.microsoft.com/en-us/azure/automation/automation-windows-hrw-install#remove-windows-hybrid-runbook-worker

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


  2. Martin Gospodinov 1 Reputation point
    2021-01-17T13:41:55.467+00:00

    Next I intend to put a worker into the group of the stale machine and see if that helps. But I doubt it. Probably this cmdlet Remove-HybridRunbookWorker tries to start the necessary process on the worker machine that is to be deleted and it is this process that tells Azure to delete the machine as well. Since I don't have that machine anymore I'm afraid the only "solution" would be to delete the whole Hybrid worker group.

    0 comments No comments

  3. Martin Gospodinov 1 Reputation point
    2021-01-17T20:41:52.657+00:00

    Well as surprisingly as it sounds, putting the new worker machine into the same hybrid worker group as the stale machine did the trick. Verbose logs in the powershell console were exactly the same, but this time the ghost machine disappeared from the worker group. So to answer my question in the first post:

    1. Create a new worker machine in the same hybrid Worker Group as the machine you want to delete. Use the "New-OnPremiseHybridWorker.ps1" script.
    2. From the new machine run Remove-HybridRunbookWorker using the "-MachineName" parameter.
    0 comments No comments