powershell text background color with fix width

 

# SET THE CONSOLE BLACK AFTER THAT CLEAR THE SCREEN
$host.ui.rawui.BackgroundColor = "Black"

# CLEAR CONSOLE
Clear-Host

# POWERSHELL TEXT BACKGROUND COLOR WITH FIX WIDTH
Write-Host ""
Write-Host "Hello !!!" -BackgroundColor DarkGray -NoNewline
Write-Host " ." -ForegroundColor Black

# PAUSE IN POWERSHELL
Write-Host ""
Write-Host "Press 'Enter' to continue . . . " -ForegroundColor Yellow -NoNewLine
$Host.UI.ReadLine()
Write-Host ""
Previous Post Next Post