Poweshell-Commands


Example


Clear-Host Get-Host Out-Host Read-Host Write-Host

NAME Get-Host SYNOPSIS Gets an object that represents the current host program. And, displays Windows PowerShell version and regional info rmation by default. SYNTAX Get-Host [] DESCRIPTION The Get-Host cmdlet gets an object that represents the program that is hosting Windows PowerShell. The default display includes the Windows PowerShell version number and the current region and language settings tha t the host is using, but the host object contains a wealth of information, including detailed information about the version of Windows PowerShell that is currently running and the current culture and UI culture of Windows PowerShe ll. You can also use this cmdlet to customize features of the host program user interface, such as the text and ba ckground colors. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113318 Read-Host Out-Host Write-Host REMARKS To see the examples, type: "get-help Get-Host -examples". For more information, type: "get-help Get-Host -detailed". For technical information, type: "get-help Get-Host -full". ---------------------------- NAME Out-Host SYNOPSIS Sends output to the command line. SYNTAX Out-Host [-InputObject ] [-Paging] [] DESCRIPTION The Out-Host cmdlet sends output to the Windows PowerShell host for display . The host displays the output at the command line. Because Out-Host is the default, you do not need to specify it unless you want to use its paramete rs to change the display. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113365 Out-Printer Out-Null Out-File Out-String Out-Default Write-Host REMARKS To see the examples, type: "get-help Out-Host -examples". For more information, type: "get-help Out-Host -detailed". For technical information, type: "get-help Out-Host -full". ----------------------------- NAME Read-Host SYNOPSIS Reads a line of input from the console. SYNTAX Read-Host [[-Prompt] ] [-AsSecureString] [] DESCRIPTION The Read-Host cmdlet reads a line of input from the console. You can use it to prompt a user for input. Because you can save the input as a secure string, you can use this cmdlet to prompt users for secure data, such as passwords, as well as shared data. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113371 Get-Host Out-Host Write-Host ConvertFrom-SecureString REMARKS To see the examples, type: "get-help Read-Host -examples". For more information, type: "get-help Read-Host -detailed". For technical information, type: "get-help Read-Host -full". ----------------------------- NAME Write-Host SYNOPSIS Writes customized output to a host. SYNTAX Write-Host [[-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 ] [] 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. RELATED LINKS Online version: http://go.microsoft.com/fwlink/?LinkID=113426 Write-Verbose Write-Error Write-Progress Write-Debug Write-Output Write-Warning Out-Host REMARKS To see the examples, type: "get-help Write-Host -examples". For more information, type: "get-help Write-Host -detailed". For technical information, type: "get-help Write-Host -full".

Copy and Try it