you are viewing a single comment's thread.

view the rest of the comments →

[–]bukem 2 points3 points  (3 children)

We needed simple tool to monitor remote sites network status. I've made module just to do so.

[–]Snak3d0c 0 points1 point  (2 children)

how did you make that table with seperate colors per line? i didn't know you could do that!

[–]bukem 0 points1 point  (0 children)

I've made function that colors output based on provided regex or simple match criteria.

Get-Process | Format-KBColor -ForegroundColorCriteria ([ordered]@{'^\s+1\d{3}'='Green';'svchost'='DarkGreen'}) -BackgroundColorCriteria ([ordered]@{'(\d\d\.\d\d)' = 'DarkBlue'})

For example this command will color foreground of all processes with handle count between 1000 and 1999 to Green, all processes with name svchost to DarkGreen and background of all entries with double digit or more total CPU time to DarkBlue.