Chapter 20. PowerShell and XML: better together

Josh Gavant

In the words of PowerShell creator Jeffrey Snover in his 2002 “Monad Manifesto” (, “[t]he traditional model for administrative automation ... requires clumsy, lossy, imprecise text manipulation utilities.” Command-line input and answer files are unstructured text; output is a hodgepodge of details that the command’s authors deem helpful. To use the text output from one command as input for another, that text has to be parsed, and the script author has to pray that the chosen parsing works consistently. In fact, Snover coined the term prayer-based parsing, and defines it as follows:


Prayer-based parsing is when you parse ...

Get PowerShell Deep Dives now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.