themes - Retain coloring scheme for Powershell cmdlet after execution -
is there way retain powershell command coloring scheme after execution of command in console pane.
and there way color output column-headers separately.
none of themes browsed or find online achieve this.
try following:
get-disk | select -property * | ft -autosize -wrap | out-string -stream | %{if($_ | select-string 'style' -notmatch){write-host $_ -f yellow}else{write-host $_}}
this passes output string. -stream operator makes each line separate string, , check each string in header ('style'). if checks, string gets written out color formatting.
Comments
Post a Comment