I have a basic command I'm using to check around 100 servers for the last 5 updates and return their installed date. I'd like to get the script to return the line in red if the installed date is blank.
The command is
Get-WmiObject -Class Win32_QuickFixEngineering -ComputerName $ComputerName | Select-object -Property PSComputerName, @{n='HotFix ID';e={$_.hotfixid}}, @{n='Installation Date';e={$_.installedon}} | select -Last 05
I tried to use format-color but it wouldn't work. The output of the command looks like this
PSComputerName HotFix ID Installation Date
-------------- --------- -----------------
DC1 KB4132216 10/6/2021 12:00:00 AM
DC1 KB4535680 11/3/2021 12:00:00 AM
DC1 KB4589210
DC1 KB5005698 10/6/2021 12:00:00 AM
DC1 KB5007192 11/16/2021 12:00:00 AM
The line without a date I'd like to be red. Is this possible?
Thank you!
