See https://stackoverflow.com/questions/62617181/how-to-use-hex-codes-for-color-in-write-host
https://wenijinew.medium.com/powershell-set-colorful-customized-prompt-c26ba496491
Note that this will not work in Powershell_ISE.
$apps = @()
$systemapp = "This is systemapp"
function to_yellow ($msg) {
"$([char]0x1b)[93m$msg$([char]0x1b)[0m"
}
function to_green ($msg) {
"$([char]0x1b)[32m$msg$([char]0x1b)[0m"
}
function to_red ($msg) {
"$([char]0x1b)[91m$msg$([char]0x1b)[0m"
}
""
"This is in " + (to_green "green") + ", and this is in " + (to_yellow "yellow")
""
$requirapp = "Notepad"
$apps += [PSCustomObject]@{RequirApp=$requirapp; $systemapp= (to_green "Installed")}
$requirapp = "Lotus Notes"
$apps += [PSCustomObject]@{RequirApp=$requirapp; $systemapp= (to_red "Not Installed")}
$apps