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 sandbox1 GBApplies to Azure sandboxes only.
Maximum amount of memory given to a sandbox400 MBApplies to Azure sandboxes only.
Maximum number of network sockets allowed per sandbox1,000Applies to Azure sandboxes only.
Maximum runtime allowed per runbook3 hoursApplies 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

  1. First your create a Virtual Machine in Azure (or multiple) with the virtual hardware you need to execute.
  1. Connect to the VM(s) and install any PowerShell modules needed by the runbook.
  2. Go back to Azure portal and Create a Hybrid Worker Group
  1. Give the Hybrid Worker Group a suitable name and decide if you want to use credentials or the system account to execute your runbooks.
  1. Add your Hybrid worker machine (or machines) to the Hybrid Worker Group
  1. 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.

About The Author

Mr T-Bone

Torbjörn Tbone Granheden is a Solution Architect for Modern Workplace at Coligo AB. Most Valuable Professional (MVP) on Enterprise Mobility. Certified in most Microsoft technologies and over 23 years as Microsoft Certified Trainer (MCT)

You may also like...

1 Response