Hi, I've got a strange one and not sure how to even troubleshoot it. I've setup a runbook to run on a hybrid worker, if I run it through the automation account on azure it completes successfully and I can verify its completed the task within my onprem AD.
Since its part of a larger project I added it to my LogicApp and it says its completed successfully but when checking onprem AD I can see it hasnt actually done the task. I then thought I would create a basic Power Automate flow to only run this runbook and again it says its completed successfully but when looking at AD I can see it hasn't.
I found a post which I guess had a similar issue and they mentioned creating a "PowerShell Workflow" runbook instead of a regular "Powershell" runbook, which I did but it still doesn't actual do the task within the script (but does say it completed successfully?
Any ideas or suggestions?
Looks like I figured out what I was doing wrong. So when manually running a runbook via the Automation Account on the Azure interface you are given the option to select either "run settings > run on > Azure or Hybrid Worker". I've obviously been selecting Hybrid Worker in my case and getting the result I wanted.
However when I've been using Power Automate or Logic Apps to run my runbook, I'm guessing it takes the first option as I cant see a way to pick "Run on > Hybrid Worker" any whwere. The way I've got it to work is create a "Webhook" for the Runbook (Runbook > Resources (left hand pane) and select "Webhook), when setting up the Webhook it gives you the option for "run on" then simply use an HTTP/POST within your PowerAutomate or LogicApp and thats how I got it working on premise via PowerAutomate or LogicApp.
If anybody knows of a better way please post up as ihavenoideawhatimdoing.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492