concept state in category powershell

appears as: state, State, states, The states, The state
PowerShell in Depth, Second Edition

This is an excerpt from Manning's book PowerShell in Depth, Second Edition.

That way, the server can, for example, maintain the state of things like a shopping cart. PowerShell isn’t a web browser, though, and doesn’t automatically handle cookies like a web browser would. So each request the shell sends is a fresh new relationship with the server, and that might not work for some scenarios.

  • -PSPersist—Forces the workflow to save (“checkpoint”) the workflow data and state after executing each step (we’ll show you how you can also do this manually)
  • 23.2.3. Persisting state

    The state of a workflow consists of its current output, the task that it’s currently executing, and other information. It’s important that you help a workflow maintain this state, especially when kicking off a long-running command that might be executed. To do so, run the Checkpoint-Workflow command (or the Persist workflow activity). You can force this to happen after every single command is executed by running the workflow with the –PSPersist switch. State information is saved to disk by WWF so that the workflow can be resumed after a power failure or other problem or if you intentionally need to pause the workflow.