email

Color-code cells in HTML mail based on criteria  #angularjs #reactjs

  • You will also need to change the $servers variable to point to your list of server names to check against.
  • After 7 days, the reports will be moved $Link2

    ” $Output = $OutArray | Select Server, PingResults, @{E={$_.FreeSpaceC};Label=”Free Space C: (GB)”}, @{E={$_.FreeSpaceD};Label=”Free Space D: (

  • Size / $ConvertToGB)) GB

    ” $htmlReport += “

    $([Math]::Truncate($disk.
  • The text file will contain all of the server names that you want to check, on their own line.
  • You are going to have to create the HTML table yourself since the builtins dont support conditional formatting like you are asking for.

What I’d like to do, is color code the individual cells based on their values. Specifically, I’d like to have the cell shaded RED if the free space is less than 300 on any of the drives. What’s the easiest means to do this based on the results being sent by PowerShell Send-MailMessage in HTML format?

@ng_real_ninja: Color-code cells in HTML mail based on criteria #angularjs #reactjs

I have written this so that it generally does what you want. It is already set to go with HTML tables and an free relay server email provider. This script takes one text input file that you can specify at the top. This text file will contain all of the server names that you want to check, on their own line. Example below. If you want to use your own email provider, you can just replace all the smtp info. Otherwise, it DOES REQUIRE admin priviledges to be run successfully. These credentials can be entered at the top of the script where

$cred

is specified. You will also need to change the

$servers

hqdc01 hqdc02 hqdc03 hqfile01 hqfile02 hqmail01 hqservices01 hqsql01 hqsql02

email