Skip to content

Should Write-Information output printed to the console have the "INFO: " prefix? #6951

@mklement0

Description

@mklement0

Write-Information output currently does not use an INFO: prefix when printing its output to the console.

This contrast with the Write-Verbose, Write-Warning, and Write-Debug cmdlets, all of which use an analogous prefix when printing to the console, so as to make it easier to distinguish data (success) output from output to other streams.

Curiously, however, when you transcribe a session (Start-Transcript), the INFO: prefix is present.
(Discrepancies between console-output and transcription behavior are summarized in #4645
and are being at least partially addressed in PR #6917).

Note that changing console output so show INFO: too wouldn't technically be a breaking change - for-display output is not part of the contract with the user - but it would be a noticeable one.

Current behavior

PS> Write-Information hi -InformationAction Continue
hi

Behavior that would be consistent with other Write-* cmdlets (except Write-Output)

PS> Write-Information hi -InformationAction Continue
INFO: hi

Environment data

Written as of:

PowerShell Core v6.1.0-preview.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-By DesignThe reported behavior is by design.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions