O'Reilly logo

Instant Windows PowerShell Guide by Harshul Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

WorkFlow sessions (Advanced)

Windows PowerShell 3.0 has the capability to maintain workflows and execute them in the environment. It is built on Windows Workflow Foundation, which is written in XAML.

Getting ready

WorkFlow is an enhanced version of a function where you can create an execution sequence by using various command statements. It maintains a reliable session throughout the execution, which serves the reboot and disconnection of network problems in between the execution.

How to do it...

  1. There are two ways to execute a workflow in the console:
    • Using Invoke-AsWorkFlow
    • Using New-PSWorkflowSession

    Note

    You can create a workflow using the Workflow keyword.

    For example:

    Workflow <WorkFlowName>
    {
      # param block
      # logic block
    }
  2. The following command statement ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required