Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

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

$
0
0

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

            }

 


Viewing all articles
Browse latest Browse all 3333

Trending Articles