Aracılığıyla paylaş


Clear-Host

Clears the display in the host program.

Sözdizimi

Default EnterprisePublishing

Clear-Host

Description

The Clear-Host function removes all text from the current display, including commands and output that might have accumulated. When complete, it displays the command prompt. You can use the function name or its alias, cls.

Clear-Host affects only the current display. It does not delete saved results or remove any items from the session. Session-specific items, such as variables and functions, are not affected by this function.

Because the behavior of the Clear-Host function is determined by the host program, Clear-Host might work differently in different host programs.

Girişler

None

You can't pipe objects to this cmdlet.

Çıkışlar

None

This cmdlet returns no output.

Notlar

Windows PowerShell includes the following aliases for Clear-Host:

  • clear
  • cls

Clear-Host is a simple function, not an advanced function. There are no parameters.