liveBook · Manning

Write-Host

Write-Host is a PowerShell cmdlet that writes content directly to the host interface and information stream.

How 2 Manning books explain it

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Write-Host is a PowerShell cmdlet that writes text to the host application's screen and to the information stream.

How it is used
Displays administrative or script messages directly to the hosting application while also recording them in the information stream.
How deep it goes
Explains screen output, pipeline behavior, colors, and information-stream implementation, while deferring broader stream details.
Examples
Demonstrates calculated values, interpolated messages, and foreground and background color parameters.
What you can do after
Apply Write-Host to display messages, choose supported colors, and control informational output with $InformationPreference.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains Write-Host →

Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

Write-Host is a PowerShell cmdlet that writes content directly to the host interface and, in PowerShell v5 and later, also routes it through the information stream.

How it is used
Distinguishes human-facing host messages from reusable pipeline and Information-stream output.
How deep it goes
Explains host behavior, PowerShell 5 stream integration, practical exceptions, and alternatives, but stops short of complete cmdlet syntax.
Examples
Uses colored status messages, captured InformationRecord objects, tagged messages, and a contrasting structured-object pipeline example.
What you can do after
Evaluate/understand when to replace Write-Host with Write-Information, Write-Progress, or structured pipeline output.

Read how Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools explains Write-Host →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.