Trigger Flow when you log on, run from Windows Batch or PowerShell Script #PowerAutomate

preview_player
Показать описание
Did you know you can call a Power Automate flow from your desktop? Either using the Premium HTTP trigger or by using the OneDrive Sync Client and creating a temporary file with Parameters? You can even call these scripts automatically when you first log on and automate your early morning cloud tasks! Let me show you how I built this and the tricks of the Windows Startup folder(s), Windows Command Line / DOS Batch and PowerShell.

Please like and subscribe and let me know what you have used this for.

#PowerShell #PowerAutomate #DosBatch #OneDrive #WindowsCommandLine

Individual User Startup Folder
C:\Users\*USERNAME*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
ALL USERS Startup Folder
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

Call PowerShell from Dos Batch
powershell C:\Scripts\HTTP.ps1

PowerShell HTTP Post

Dos BatchScript with ARRAY
echo {"date":"%DATE%" , "time":"%TIME%", "UN":"%username%", "Computer":"%ComputerName%", "status":"Client", "Client":"Microsoft"} **insert greater than symbol here *** C:\Users\*USERNAME*\OneDrive\*YOURCHOSENFOLDER*\%DATE:~0,2%_%DATE:~3,2%_%DATE:~6,4%_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%.txt

ShutDown in 30 seconds....
Рекомендации по теме
Комментарии
Автор

My "When a file is created" screen looks nothing like yours and it won't recognize that action as a trigger. What am I doing wrong? I get an error message that states: "Should at least contain one trigger and one action" when I try to create the new trigger.

stephaniebach
Автор

which "formula" is in the json expression in the excel field status?

npe_s
Автор

Is there any way we could schedule or trigger PAD flow without cloud flow scheduling?

arulmanohar
Автор

Is it possibel to start a flow in PAD when starting an application? or even when doing specific command/task in that application?

LaukurHaukur
Автор

This is not a DOS batch file, it is a Windows only batch file. Powershell is not a part of MS DOS. Windows is not DOS.

maxmuster