Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

modifying the color of multiple lines for write-output

$
0
0

hi friends

i have written the following code at the beginning of my script :

write-host "1- first App1 must be installed " -Foreground yellow

write-host "2-n`check you have copied your custom MMC console to all users desktop" -Foreground yellow

write-host "3-n`install your AV" -Foreground yellow

Read-Host "press enter to continue"

 

now my need is i want to shorten the script. but i don't know how can i use one -foregroundcolor parameter to be applied on multiple lines?

 i mean something like this (although the following won't work actually, its just an example of my need:

write-host 

(

line1

line2

line3

)  -foregroundcolor yellow

 

thanks in advanced

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles