Files
ImportExcel/Examples/ConditionalFormatting/ConditionalText.ps1
2016-01-18 10:01:36 -05:00

11 lines
456 B
PowerShell

$file = ".\conditionalTextFormatting.xlsx"
rm $file -ErrorAction Ignore
Get-Service |
Select Status, Name, DisplayName, ServiceName |
Export-Excel $file -Show -AutoSize -AutoFilter -ConditionalText $(
New-ConditionalText stop
New-ConditionalText runn darkblue cyan
New-ConditionalText -ConditionalType EndsWith svc wheat green
New-ConditionalText -ConditionalType BeginsWith windows darkgreen wheat
)