Skip to content
ConsoleMonster
Cmdlet

Write-ConsoleLog

Module ConsoleMonster
Inputs
System.Object

Writes a line to the log region of a running dashboard.

Syntax

Write-ConsoleLog [-Highlight <String>] [-Level <String>] [-Message] <Object> [-Name <String>] [-Session <LiveSession>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Writes a line to the log region of a running dashboard.

-Level sets the tag: info, warn, err, verbose, debug or pass. Only warnings and errors are coloured. Write-Host in a dashboard runspace reaches the same log automatically.

Examples

Authored help example

EXAMPLE 1

Write-ConsoleLog -Message 'Value'

Parameters

-Highlight String optional
Highlights the message: Smart (numbers, booleans, GUIDs, IP addresses, URLs, paths, dates, DNs, quoted strings) or a language such as Json or PowerShell. The message stays literal.
-Level String optional
The level: info, warn, err, verbose, debug or pass.
Possible values: info, warn, err, verbose, debug, pass
-Message Object requiredposition: 0pipeline: True (ByValue)
The message.
-Name String optional
The log name; defaults to the dashboard's log region.
-Session LiveSession optional
The live session to update. Defaults to $ConsoleSession or the running dashboard.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.