PowerShell offers many different options when it comes to displaying your data. One of my favorites is changing the foreground and background colors of text. This is probably because way back (circa 1985) I used the Inverse and Flash commands do make different parts of my Applesoft Basic programs stick out. This is also an improvement on the MS DOS command prompt we so often work with. It only has two colors, foreground and background. Below is the syntax to write text in color on both the Shell, and the ISE. Write-Host “ Text to display” –ForegroundColor ColorValue – BackgroundColor ColorValue2 Here are you valid choices for each color value: Black DarkBlue DarkGreen DarkCyan DarkRed DarkMagenta DarkYellow Gray DarkGray Blue Green Cyan Red Magenta Yellow White
Welcome to the blogsite of MCTExpert. I am a Microsoft Certified Trainer. Here you will find the real questions that are asked to me by my students.