PowerShell for Windows Admins:

Workflow

1

July 6, 2014  8:50 AM

Workflows 7: checkpointing workflows

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

Consider this workflow workflow chkpt1 { Get-Process foreach ($x in 1..20){ $x } }   It will dump out the process information then output the numbers 1 to 20.  Not a particularly enlightening workflow but it forms  a nice basis for demonstrating checkpoints. A...

June 30, 2014  12:55 PM

Workflows 6: suspending jobs

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

One of the great things about work flows is that you can stop and start them. A workflow can be stopped, on a temporary basis, by using the Suspend-Workflow activity. workflow suspend1 { Get-Service Suspend-Workflow Get-Process } suspend1   This will run the Get-Service...


June 26, 2014  11:34 AM

Workflows: 5a CDXML modules update

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

In my last post I questioned why commands from CDXML didn’t fail as thee weren’t any activities defined for them.  Turns out that functions and other commands that don't explicitly have their own workflow activities are implicitly wrapped in the inline script activity.  As CDXML modules...


June 24, 2014  2:11 PM

Workflows: 5 CDXML modules

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

Last time we saw that you’re not really using cmdlets in PowerShell workflows – you’re using workflow activities. Some cmdlets haven’t been packaged into activities and for those you need to put them in an Inlinescript block.  You can also use an Inlinescript block to run any arbitrary...


June 22, 2014  8:13 AM

Workflows: 4 Using cmdlets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

This is a simple function to return some data about a system: function get-serverdata { Get-CimInstance -ClassName Win32_OperatingSystem Get-Service Get-Process } get-serverdata   The function will return the CIM data about the operating system, then the service data and...


June 19, 2014  1:08 PM

Workflows: 3 parallel and sequence

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

I said in the first post in this series that you could force a workflow to perform tasks in parallel or in sequence. Starting with parallel you can force parallel execution by using the parallel keyword: workflow thursday1 { parallel { 1..26 | foreach {$psitem} 65..90 | foreach...


June 18, 2014  2:04 PM

Workflows: 2 Additional reading

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

If you’re really interested in using workflows you may find this series of articles I did for the Scripting Guy useful: 1. Basics - introduce workflows, key concepts and keywords


June 18, 2014  1:13 PM

Workflows: 1 Introduction

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
PowerShell, Workflow

In a recent post I asked for areas of PowerShell that caused problems. Workflows were one of the things mentioned so I’ll start with a series of posts on that topic. Workflows were introduced to PowerShell in version 3.0 of the Windows Management Framework with Windows 8/2012. A few changes...


1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: