Skip to content
ConsoleMonster
Cmdlet

Clear-ConsoleScreen

Module ConsoleMonster
Inputs
None

Clears the console screen, safely.

Syntax

Clear-ConsoleScreen [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Clears the console screen, safely.

On an interactive console the screen and its scrollback are cleared and the cursor goes to the top left, like Clear-Host. It does nothing where clearing would only lose output: redirected output, CI logs, plain mode (CONSOLEMONSTER_MODE=plain), background and thread jobs, and while a live dashboard owns the console. In the ISE and other hosts with a screen buffer it clears that buffer the way Clear-Host does.

Examples

Authored help example

EXAMPLE 1

Clear-ConsoleScreen

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.