Hello there,
I have a Challenge in PowerShell 3.0. I'd like to have my services listed with get-service and also i want all the 'stopped' services marked red and all the 'running' services marked green. here's what i wrote:
get-service | foreach-object if ($_.status -eq "stopped") write-host {$_.status -foregroundcolor "red"}I have been working on the commands for hours but i never got a working result. This challenge is from the Microsoft Virtual Academy Powershell course for beginners part one, so I don't have any experience yet with Powershell at all! This is why i hope this might be quite easy for You guys to solve!
Thanks for Your support! :)