Hybrid Runbook Worker Failed to create a self-signed certificate.

Cause

Due to an Azure service outage affecting Azure Automation; automation jobs were not running on a Hybrid Worker and going to a failed state or hanging.

The issue was raised with Microsoft, who advised us to remove a certificate from the Microsoft Monitoring Agent store. However, this was before they were fully aware of the outage. After realising it was a wider outage the removal completely broke the Hybrid Worker.

Upon the service outage being rectified, the Hybrid Worker never came back up again…

Issue

To try and bring the Hybrid Worker back online. I went through the usual steps of removing the Hybrid Worker troubleshooting article. When attempting to add/remove the Hybrid Worker from the server, it just kept returning back the below error: