Skip to content
ConsoleMonster

Certificate expiry report

Review certificate renewal deadlines, named owners and practical next actions in one concise report.

Demos Reports

Use it when certificate renewals need an owner and a visible deadline.

  • Static
  • 100×30
  • PowerShell 7.4+
  • .NET 8.0+
Certificate expiry report 100×3024-bitFull

How it's built

The whole program in one file, with its sample data at the top. It drew the recording above; both languages draw the same cells.

PowerShellcertificate-expiry.ps1View on GitHub
# Review certificate renewal deadlines with an owner and a concrete next action.
param([switch] $StaticSnapshot, [ValidateRange(0, 0)][int] $Step = 0)
Import-Module ConsoleMonster

# Data: fixed dates and fictional certificates; no certificate store or private key is opened.
$certificates = @(
    [pscustomobject] @{ Name = 'api.example.test'; Expires = '2026-11-02'; Days = 9; Owner = 'Platform'; Status = 'Warn' }
    [pscustomobject] @{ Name = 'vpn.example.test'; Expires = '2026-10-26'; Days = 2; Owner = 'Network'; Status = 'Fail' }
    [pscustomobject] @{ Name = 'packages.example.test'; Expires = '2027-02-14'; Days = 113; Owner = 'Build'; Status = 'Pass' }
    [pscustomobject] @{ Name = 'portal.example.test'; Expires = '2026-12-18'; Days = 55; Owner = 'Web'; Status = 'Pass' }
)

# Layout: put urgent renewals beside the inventory, with thresholds visible.
$report = New-ConsoleRows -Gap 1 {
    New-ConsoleRule '[bold]Certificate renewals[/] [muted]· as of 2026-10-24[/]'
    '[fail]1 urgent[/]   [warn]1 due soon[/]   [pass]2 healthy[/]'
    New-ConsoleTable -InputObject $certificates -Property Name, Expires, Days, Owner, Status -Expand
    New-ConsolePanel -Title 'Renewal policy' {
        New-ConsoleStatusList {
            New-ConsoleStatusItem 'vpn.example.test' -Status Fail -Detail 'Network · renew before Monday'
            New-ConsoleStatusItem 'api.example.test' -Status Warn -Detail 'Platform · schedule renewal this week'
        }
        '[muted]Urgent: 7 days or fewer · due soon: 30 days or fewer[/]'
    }
}

# Behaviour: print once; connect your own inventory reader before rendering.
$report | Write-ConsoleWidget
C#Program.csView on GitHub
// Review certificate renewal deadlines with an owner and a concrete next action.
using ConsoleMonster;
using ConsoleMonster.Layout;
using ConsoleMonster.Presenters;
using ConsoleMonster.Styling;
using ConsoleMonster.Widgets;

// Data: fixed dates and fictional certificates; no certificate store or private key is opened.
var certificates = new[] {
    new { Name = "api.example.test", Expires = "2026-11-02", Days = 9, Owner = "Platform", Status = "Warn" },
    new { Name = "vpn.example.test", Expires = "2026-10-26", Days = 2, Owner = "Network", Status = "Fail" },
    new { Name = "packages.example.test", Expires = "2027-02-14", Days = 113, Owner = "Build", Status = "Pass" },
    new { Name = "portal.example.test", Expires = "2026-12-18", Days = 55, Owner = "Web", Status = "Pass" }
};

// Layout: put urgent renewals beside the inventory, with thresholds visible.
Table table = new Table { Expand = true };
table.AddColumn("Name").AddColumn("Expires").AddColumn("Days").AddColumn("Owner")
    .AddColumn("Status", column => column.Presenter = CellPresenters.StatusWord);
foreach (var certificate in certificates) {
    table.AddRow(certificate.Name, certificate.Expires, TableCell.FromValue(certificate.Days),
        certificate.Owner, TableCell.FromValue(certificate.Status));
}
StatusList renewals = new StatusList()
    .Add("vpn.example.test", StatusKind.Fail, "Network · renew before Monday")
    .Add("api.example.test", StatusKind.Warn, "Platform · schedule renewal this week");
Rows report = new Rows(
    new Rule("[bold]Certificate renewals[/] [muted]· as of 2026-10-24[/]"),
    new TextBlock("[fail]1 urgent[/]   [warn]1 due soon[/]   [pass]2 healthy[/]"), table,
    new Panel(new Rows(renewals,
        new TextBlock("[muted]Urgent: 7 days or fewer · due soon: 30 days or fewer[/]")), "Renewal policy")) { Gap = 1 };

// Behaviour: print once; connect your own inventory reader before rendering.
Terminal.Write(report);

Run it yourself

Three steps in PowerShell, four in C#. Every command copies with one click.

  1. Install the module

    Once. Windows PowerShell 5.1 or PowerShell 7 on Windows, macOS or Linux.

    Install-Module ConsoleMonster -Scope CurrentUser
  2. Save the program

    Download it, or copy it from above into certificate-expiry.ps1.

  3. Run it

    From the folder you saved it in.

    ./certificate-expiry.ps1
  1. Create a project

    A plain console app; .NET 8 or later.

    dotnet new console -n Certificateexpiry; cd Certificateexpiry
  2. Add ConsoleMonster

    The only package the program needs.

    dotnet add package ConsoleMonster
  3. Replace Program.cs

    Download it, or copy the program from above.

  4. Run it

    dotnet run

Or skip the copying. Every demo ships with the module and the project template.

Show-ConsoleDemo certificate-expiry
Get-ConsoleDemo certificate-expiry -Path ./certificate-expiry.ps1
dotnet new install ConsoleMonster.Templates
dotnet new consolemonster --demo certificate-expiry -n Certificateexpiry

Make it yours

Start with these, then read the rest of the file.

  1. Replace the fixed certificate list with inventory records and calculate days remaining before rendering.

  2. Set your urgent and warning thresholds, keeping the same policy in the summary and table.

  3. Assign renewal owners and a concrete next action for each certificate.

More reports

All demos