Azure Automation – Hybrid job with custom runas account

Microsoft and the Azure Automation team has made it possible to use a custom account when running a job on a hybrid worker and that is awesome! Originally the jobs runs under the Microsoft Management Agent´s service account context and that is not always wanted.

Screen Shot 2016-01-09 at 13.56.43

As I described in a post that I did some time ago I used a parameter -PScredential with the inlinescript but now I can with the new functionality get the whole job in the right user context, the user should be saved as a credential asset in your automation account! Last year also the possibility to use PowerShell scripts runbooks besides Workflow runbooks!

Screen Shot 2016-01-09 at 13.57.15

Happy automating!