Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Pipeline Function to Highlight

$
0
0

Hi,

I would like to write a pipeline function to highlight objects for a certain condition, Is there a way I can do this -

Basically I like to implement Highlight-Object which can take a script block for condition and color to highlight

get-service | Higlight-object {$_.status -eq 'Stopped'} -FColor Red

I am hopping to implement this for any input object the way where-object and Format-Table works

Thanks,

Shiju Samuel


Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>