Forum Discussion

Mehak1865's avatar
Mehak1865
Copper Contributor
Mar 01, 2019

Execute Workflow through SP Online Management Shell for Sharepoint O365?

HI All,

 

I have multiple items in my library, and I want to run the workflow automatically for all the items. 

Is there any method to start workflow on all items using online management shell?

I have found scripts for on-premises but not for SP online O365.

 

Thank you

  • Eva Vogel's avatar
    Eva Vogel
    Steel Contributor
    Hello! Is it an option for you to create your workflow with ms flow? I don’t know much about powershell so far but you could create a workflow on your items in a library with a „for each“ loop within that app. Also conditions and variables for editing a certain metadata are possible. Greets, Eva
    • Mehak1865's avatar
      Mehak1865
      Copper Contributor

      Thank you Eva and Juan , 

       

      I have created the workflows in SharePoint designer as it has quite a complex logic . The system is migrated from on-premises. 

      The data migrated from the old system needs to have workflows started on all items. That is the reason I need to use a tool or method which can start my workflow on all items in the library. I was looking into PnP and Management Shell scripts that I can find any way to run the workflow in for each loop.

Resources