Powershell - Write-Host Cmdlet
Advertisements
Cmdlet
Write-Host cmdlet is used to write customized messages.
In these example, we're see the Write-Host cmdlet in action.
Example
In this example, we'll show a customized message.
Write-Host (2,4,6,8,10,12) -Separator ", -> " -ForegroundColor DarkGreen -BackgroundColor White
Output
You can see the even numbers with separator, in green color and on white background.
2, -> 4, -> 6, -> 8, -> 10, -> 12
powershell_advanced_cmdlets.htm
Advertisements