Workflow will not start on PowerShell updated list item (InfoPath form) when script is triggered by Task Scheduler
-
venerdì 13 aprile 2012 16:06
I have a PS script that updates an item in a SP2010 list so that a workflow will be started. When I run the PS script manually from the PS window on the server it resides, the script runs flawlessly. If I set a scheduled task on the same server to run the script with the same credentials as are being used in the PS window, the script runs, updated the info on the list, but DOES NOT start the workflow. As we know, SPD workflows cannot be started by anonymous or system accounts. It is as if the task scheduler adds a bit of information that makes the SP2010 list think the information was updated by one of these accounts even though the field in the list for the item being updated shows the correct account.
HELP!!!
D
Tutte le risposte
-
domenica 15 aprile 2012 14:49
Hi D.
My best guess is this:
When you run the script 'manually', you have a PS prompt started with 'run as' Administrator(Elevated privileges) right?
When you run the script by the task scheduler, it runs using the same account but not elevated.Also, you could try to set the execution policy differently(should be ok I know but it could be worth a try?)
Hope that helps?
Regards
Thomas Balkeståhl - Technical Specialist - SharePoint - http://blog.blksthl.com
Download the SharePoint Branding Project here- Contrassegnato come risposta Emir LiuMicrosoft Contingent Staff, Moderator giovedì 19 aprile 2012 02:50
-
domenica 15 aprile 2012 17:54
Wich account runs the scheduled task? If you see "System Account" as the user that last modified your item, the workflow will not be triggered (since MOSS SP1 was released). You should use a different account.
Cheers
Riccardo- Contrassegnato come risposta Emir LiuMicrosoft Contingent Staff, Moderator giovedì 19 aprile 2012 02:50

