Powershell dynamic HTML table

This page summarizes the projects mentioned and recommended in the original post on /r/PowerShell

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • PSWriteHTML

    PSWriteHTML is PowerShell Module to generate beautiful HTML reports, pages, emails without any knowledge of HTML, CSS or JavaScript. To get started basics PowerShell knowledge is required.

  • Import-module Import-Module PSWriteHTML Gathering Data $results = [pscustomobject] @{ 'Source DC' = "Myserv.HostName.ToUpper()" 'Partner DC' = "N/A" Direction = "N/A" Type = "N/A" 'Last Attempt' = "N/A" 'Last Success' = "N/A" 'Last Result' = "1" } # Prepare to export in a beautiful HTML file $ReportPath = "$PSScriptRoot\DHCPReport-At-$(Get-Date -f "dd-MM-yyyy").html" # Optional settings : set default values for some cmdlets (I'm lazy) $PSDefaultParameterValues = @{ "New-HTMLSection:HeaderBackGroundColor" = "Green" "New-HTMLSection:CanCollapse" = $true } New-HTML -FilePath $ReportPath -Online -ShowHTML { # First Tab New-HTMLTab -Name 'DC Health Report' { New-HTMLSection -HeaderText "Replication Status" { # Here, we're putting all Data previously gathered in the var $Result New-HTMLTable -DataTable $results { New-TableCondition -Name "Last Result" -Operator ne -Value "N/A" -BackgroundColor red -Color white -Alignment center New-TableContent -Alignment center } #end-newHtmlTable } # end New-htmlSection # In the same Tab, you could add another section (of course in my case, this section is empty New-HTMLSection -HeaderText "Replication Status2" { # Here, we're putting all Data previously gathered in the var $Result2 New-HTMLTable -DataTable $results2 { New-TableCondition -Name "Last Result" -Operator ne -Value "N/A" -BackgroundColor red -Color white -Alignment center New-TableContent -Alignment center } #end-newHtmlTable } # end New-htmlSection } # end New-HtmlTab # But you could add some other tabs New-HTMLTab -Name 'DC Health Report2' { New-HTMLText -FontSize 16 -Color blue -Text @( "This is a text with a lion to [PSWriteHTML Github site](https://github.com/EvotecIT/PSWriteHTML)." "This is not really difficult" ) } # end New-HtmlTab } # end-New-html

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts