1

I have a script.ps1 file which contain the logic of run email notification Workflow and its working fine on execution with SharePoint Power Shell.

How should I link my script.ps1 file with Windows Task scheduler? So I will run this workflow every day.

And script.ps1 scripts supported with only SharePoint Powershell not Windows Power Shell.

1

Create the scheduled task and set the action to:

  • Program/Script: Powershell.exe
  • Arguments: -File "C:\script.ps1"

If you got issue with - File only use &'c:\script.ps1'

enter image description here

  • The answer does not tackle any permission issues a script running against Sharepoint will surely meet. – Juha Metsäkallas Nov 14 '19 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.