October 2nd, 2015

PowerTip: Use Non-Approved Cmdlet or App within PowerShell Workflow

Doctor Scripto
Scripter

Summary: Learn how to use a basic inline script in Windows PowerShell workflows.

Hey, Scripting Guy! Question I’m trying to convert a Windows PowerShell script to a workflow, but I keep running into an error that suggests
           the cmdlet cannot be used in a workflow. How can I get around this?

Hey, Scripting Guy! Answer Wrap that section of the workflow as an inline script, and recapture your variables with the Using keyword,
           for example:

Inlinescript

            {

            $Somevariable=Using:SomeVariable

            Start-ProblematicFunction $Somevariable

            }

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.