Is it possible to schedule powershell commands in flow to work on office 365 online.
I am wanting to run this command every week
Get-MessageTrace -senderAddress a.user@company.com -StartDate 10/08/2018 -EndDate 10/15/2018 | group-object -Property RecipientAddress | select name,count | sort count -desc
Is it possbile and if so can I feed in variablies to the startdate and enddate so that every week I can collect the results (idealy saved to a sharepoint list) of the last week
output looks like this
Name Count
---- -----
some.body@anothercompany.com 10
another@another.com 6
etc.....
Solved! Go to Solution.
Hi @kjmcintosh ,
You could use Recurrence as a trigger and set Flow to run once a week.
Here is a blog on Run any PnP-PowerAhell in one AzureFunction from Microsoft Flow for your reference:
http://johnliu.net/blog/2018/4/run-any-pnp-powershell-in-one-azurefunction-from-microsoft-flow
Besides, it seems that we could also run on-premises PowerShell script from flow, the following blog for your reference:
Best Regards,
Hi @kjmcintosh ,
You could use Recurrence as a trigger and set Flow to run once a week.
Here is a blog on Run any PnP-PowerAhell in one AzureFunction from Microsoft Flow for your reference:
http://johnliu.net/blog/2018/4/run-any-pnp-powershell-in-one-azurefunction-from-microsoft-flow
Besides, it seems that we could also run on-premises PowerShell script from flow, the following blog for your reference:
Best Regards,
Thanks very much. Although I will really need to look at locking that down so might just run it locally for the time being.
appreciate you help.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
42 | |
37 | |
36 | |
23 |
User | Count |
---|---|
42 | |
31 | |
29 | |
28 | |
28 |