Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 2.0 » Write-Host

Write-Host - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Write-Host


Short description
Writes customized output to a host.

Syntax
Write-Host [[-Object] <Object>] [-BackgroundColor {Black | DarkBlue | DarkGreen | DarkCyan | DarkRed | DarkMagenta 
| DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red | Magenta | Yellow | White}] [-ForegroundColor {Black | 
DarkBlue | DarkGreen | DarkCyan | DarkRed | DarkMagenta | DarkYellow | Gray | DarkGray | Blue | Green | Cyan | Red 
| Magenta | Yellow | White}] [-NoNewline] [-Separator <Object>] [<CommonParameters>]

Description
The Write-Host cmdlet customizes output. You can specify the color of text by using the ForegroundColor parameter, 
and you can specify the background color by using the BackgroundColor parameter. The Separator parameter lets you s
pecify a string to use to separate displayed objects. The particular result depends on the program that is hosting 
Windows PowerShell.