12

Working with HTML, XML, and JSON

PowerShell has several commands for working with the HTML, XML, and JavaScript Object Notation (JSON) formats. These commands, combined with some of the available .NET classes, provide a rich set of tools for creating or modifying these formats.

HTML is often used for generating user-consumable reports.

PowerShell includes the ConvertTo-Html command, which can generate HTML content.

The PSWriteHtml module can be used to create more complex HTML documents. The module is available in the PowerShell Gallery. PSWriteHtml uses a Domain-Specific Language (DSL) to describe HTML documents in PowerShell.

What is a Domain-Specific Language?

A Domain-Specific Language or DSL is a specialized language used to describe ...

Get Mastering PowerShell Scripting - Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.