I know that the color bf
command sets the colors of the whole command line window but I wanted to to print one single line in a different color.
Setting color to the log statements in powershell is not a big deal friend.
you can use -ForegroundColor
parameter.
To write a confirmation message.
Write-Host "Process executed Successfully...." -ForegroundColor Magenta
To write an error message.
Write-Host "Sorry an unexpected error occurred.." -ForegroundColor Red
To write a progress message.
Write-Host "Working under pocess..." -ForegroundColor Green