themes - Retain coloring scheme for Powershell cmdlet after execution -


is there way retain powershell command coloring scheme after execution of command in console pane.

enter image description here

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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -