Build Hybrid worker to run Intune automation Tasks
When running in Azure Automation with Automation Accounts you will run the jobs in a Sandbox. This Sandbox have limits. These limits are quite narrow when starting processing lots of objects. This can be really frustrating. The current limits are these:
Maximum amount of disk space allowed per sandbox | 1 GB | Applies to Azure sandboxes only. |
Maximum amount of memory given to a sandbox | 400 MB | Applies to Azure sandboxes only. |
Maximum number of network sockets allowed per sandbox | 1,000 | Applies to Azure sandboxes only. |
Maximum runtime allowed per runbook | 3 hours | Applies to Azure sandboxes only. |
As you can see you have only 400MB of RAM, 1GB of Disk and 3 hours of process time. If any of them are excided, execution will fail. But it is free to use!
Add a Hybrid Worker
A hybrid worker is a simple Virtual Machine with your own custom size that can execute the job instead of the sandbox. With this you can use how much memory, disk and time you want. Downside is the cost of the hybrid worker VM. With a hybrid worker, you need to pay for the compute. It is pretty easy to
- First your create a Virtual Machine in Azure (or multiple) with the virtual hardware you need to execute.
- Connect to the VM(s) and install any PowerShell modules needed by the runbook.
- Go back to Azure portal and Create a Hybrid Worker Group
- Give the Hybrid Worker Group a suitable name and decide if you want to use credentials or the system account to execute your runbooks.
- Add your Hybrid worker machine (or machines) to the Hybrid Worker Group
- Create the Hybrid Worker Group
That wasn´t so difficult! Now you can execute the runbook in a hybrid worker and use how much resources you like.
1 Response
[…] https://www.tbone.se/2024/01/09/build-hybrid-worker-to-run-intune-automation-tasks/ […]