Donnerstag, 3. Juli 2014

Two workarounds to the PowerShell Workflow Problem

I got two workarounds to the problem in previous post.

Frank Peter Schultze ‏@fpschultze proposed to use inlinescript

 Workflow Strange
{
    param(
        [string]$folder
        )

    inlinescript
    {
    !(Test-Path -path $using:folder)
    }
}

and I found the following solution

Workflow Strange
{
    param(
        [string]$folder
        )
    $a = Test-Path -path $folder
    ! $a
}

Keine Kommentare:

Kommentar veröffentlichen