Files
ImportExcel/Examples/ConditionalFormatting/ConditionalText.ps1
2018-07-04 18:58:40 -04:00

13 lines
512 B
PowerShell

try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
$file = ".\conditionalTextFormatting.xlsx"
Remove-Item $file -ErrorAction Ignore
Get-Service |
Select-Object 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
)