Share via


PowerShell Workflow for Mere Mortals: Part 4

Summary : Microsoft Scripting Guy, Ed Wilson, continues his five-part series about Windows PowerShell Workflow.
Hey, Scripting Guy! Yesterday you talked about Windows PowerShell Workflow activities. But you only demonstrated the Parallel activity. Is there something you can share with me about some of the other types of activities? In particular I am interested in checkpoints because I think they can help me.
—AP
Hello AP,
Microsoft Scripting Guy, Ed Wilson, is here. This morning, it is really foggy outside. To be honest, it seems to look more like fall than the end of summer. But then, I am not a real weather person—I don’t even play one on TV. It is fairly humid and fairly cool—a nice morning for a cup of English Breakfast tea. I am not in the mood to experiment today, and so I am going with a standard recipe of mine: Three scoops of English Breakfast tea, a scoop of lemon grass, and a single crushed cinnamon stick. I let it steep for three minutes and 45 seconds, grab my tea pot, my Surface RT, and head outside to check email.
AP, you want to talk about checkpoints in a Windows PowerShell workflow today. No problem…
Note This is the fourth in a five-part series of blog posts about Windows PowerShell Workflow for “mere mortals.” Before you read this post, please read:

PowerShell Workflow for Mere Mortals: Part 1
PowerShell Workflow for Mere Mortals: Part 2
PowerShell Workflow for Mere Mortals: Part 3

For more information about workflow, see these Hey, Scripting Guy! Blog posts: Windows PowerShell Workflow .
Checkpoints Windows PowerShell workflow
If I have a Windows PowerShell Workflow, and I need to save the workflow state or data to a disk while the workflow runs, I can configure a checkpoint. In this way, if something interrupts the workflow, it does not need to restart completely. Instead, the workflow resumes from the point of the last checkpoint. Setting a checkpoint in a Windows PowerShell Workflow is sometimes referred to as “persistence” or “persisting a workflow.” Because Windows PowerShell Workflows run on large distributed networks, or they control the execution of long running tasks, it is vital that the workflow can handle interruptions.
Understanding checkpoints
A checkpoint is a snapshot of the workflow’s current state. This includes the current values of variables and generated output. A checkpoint persists this data to...(read more)