Hi!
I have a powershell script that i need to run from a workflow. It pulls together some information and creates a document. This document is pulled back into the repo with Import agent.
I realise the way i'm doing it is using extra steps, but i have only very basic c#/VB knowledge.
This external script (Process.ps1) needs several parameters passed in. I am getting WF to create them and make another file (Run.ps1) file with all paths, parameters etc ready.
If i run my 'run.ps1' by rclick->run in powershell, it works. If i execute in PS ISE, works.
If i run it from a workflow script activity, it gets most of the way through and gives an error trying to save the output file. I have my 'run.ps1' logging all output to a file. i can see most of the 'process.ps1' runs correctly, just not the save.
I'm logged in as domain\administrator. so i figure its permissions. i've set the 'run.ps1' to specify administrator credentials when it starts the 'process.ps1'. Seems to work, but doesn't fix the issue.
As i'm using 'start-process' i was told to use -Verb runAs, but i can't get this to run at all to test.
Also, when the workflow service is set to 'local system' it executes in windows\system32. ive also changed this, but still no good.
I realise i can replace my 'run.ps1' with c#/VB, but i'm not convinced it won't do the same issue.
Has anyone seen this type of problem?
Thanks
Mark