Is it possible to store in a variable the color of a text? I tried this but it doesn't work:
$format1 = "-ForegroundColor White"
$format2 = "-BackgroundColor Black"
Write-Host "Example" $format1 $format2
It returns:
"Example -ForegroundColor White -BackgroundColor Black" #(not colored)