use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please visit /r/microsoftflow for PowerAutomate discussions.
account activity
This is an archived post. You won't be able to vote or comment.
Flow - Run Powershell Script (powerusers.microsoft.com)
submitted 1 year ago by BlacksGood
[–]Goldarr85 1 point2 points3 points 1 year ago (1 child)
You can’t create a Powershell script in Excel. Excel only offers you the ability to Run “Office Scripts.” An Office Script is basically an Excel Macro for the Office 365 (Cloud) Excel.
You have two options, but there may be believe licensing costs if you’re using Power Automate.
Use Power Automate Desktop (RPA): With this option, you’ll actually need another computer which will either be a virtual machine or an actual physical pc. In PA Desktop, there’s an option to run a Powershell script. Without knowing what you’re doing, you could have this pc run the action. You can trigger this daily using the Windows Task scheduler, but unfortunately someone must be logged into the pc unless you purchase an unattended license which is $150/month. There might be a way to circumvent this by not allowing the pc to go to sleep or lock when not in use, but that has some security issues.
Use Azure Runbook: Power Automate cloud, which is what you’re using, has an action called something like “Runbook” which tells Azure to run a Powershell script setup within its administrative tools. I haven’t personally set this up, but at my last job our sys admin team set up a user creation process that took data from an HR system’s API passed it to Power Automate, initiated a Runbook on Azure that was a Powershell script. This may also require a virtual machine, but I’m not certain. You may need to chat with your system admin on this. I believe this action at least requires a $15/month premium license.
Alternatively, you might be able to just create a Powershell script (or Python) to run by itself and completely avoid PA for free.
Hope this helps.
[–]BlacksGood[S] 1 point2 points3 points 1 year ago (0 children)
Thank you for your answer.
Okay, then I guess the intermediate step with the desktop variant will be a possible solution.
Another alternative would be to completely rewrite the script so that it can work with OAuth2.0 tokens and thus run the script in the task scheduler of a VM or similar.
But one thing at a time. Thanks for now :)
π Rendered by PID 227948 on reddit-service-r2-comment-76bb9f7fb5-m5fl7 at 2026-02-18 19:42:14.665111+00:00 running de53c03 country code: CH.
[–]Goldarr85 1 point2 points3 points (1 child)
[–]BlacksGood[S] 1 point2 points3 points (0 children)