Search code examples
powershellsharepoint-2010executablesharepoint-workflow

How to invoke executable or powershell script from SharePoint 2010 Workflow?


I would like to invoke an executable (or Powershell script) from SharePoint 2010 workflow. What are my options? Is it even possible? I did some search online but nothing good comes out. All I get how to execute workflow from powershell script or executable but that's not what I am looking for.

Idea is to when a approver done with approving a document (doc, docx, xls, or xlsx) then I would like workflow to invoke a powershell or executable with parameters.

When I manually use the executable it looks like below from cmdlet.

C:\ConvertDocs> .\convert.exe c:\docs\test.xls c:\pdfs\test.pdf

I have a powershell with parameters that uses the same executable. And powershell script cmdlet look like below.

.\call_Convert.ps1 c:\docs\test.xls c:\pdfs\test2.pdf

Solution

  • You can use custom workflow action e.g.

    http://ilovesharepoint.codeplex.com/wikipage?title=Execute%20PowerShell%20Script%20Action