PSWriteMessage
2026.8.26
Write-Message is a drop-in replacement for the builtin Write-* cmdlets: it timestamps every message, formats it by type (Debug, Verbose, Info, Success, Warning, Error) with ANSI color and a type prefix, and can optionally tee the message to a log file.
Minimum PowerShell version
5.1
Installation Options
Owners
Copyright
(c) 2024-2026 William Quinn. Licensed under the MIT License.
Package Details
Author(s)
- William Quinn
Tags
Logging Console Write-Host ANSI PSStyle
Functions
Dependencies
This module has no dependencies.
Release Notes
2026.08.26
Changed:
- BREAKING: Write-Message no longer writes to the success stream. Output now
goes to the host via Write-Host (information stream 6), so log lines can no
longer contaminate a function's return value or a captured pipeline. Callers
that captured the string ($x = Write-Message ...) now get $null; use 6>&1 or
-OutFile to capture the text. OutputType is now [void].
- Debug/Verbose messages show for any effective preference other than
SilentlyContinue (was: only Continue), matching the built-in Write-Verbose /
Write-Debug. This makes -Debug work on Windows PowerShell 5.1, where the
switch sets $DebugPreference to Inquire rather than Continue.
Fixed:
- -Verbose / -Debug passed to an ancestor function in another module or script
is now honored; the effective preference is resolved from the caller's scope
instead of the module's own.
Full changelog: https://github.com/youvegotwq/PSWriteMessage/blob/main/CHANGELOG.md
FileList
- PSWriteMessage.nuspec
- PSWriteMessage.psd1
- LICENSE
- CHANGELOG.md
- PSWriteMessage.psm1
- README.md
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 2026.8.26 (current version) | 5 | 8/27/2026 |
| 2026.8.21 | 5 | 8/26/2026 |