Skip to content

New-NMMReport

Initializes a new NMM report builder for multi-section reports.

Syntax

New-NMMReport
    -Title <String>
    [-Subtitle <String>]
    [-LogoUrl <String>]
    [-Theme <String>]
    [-FooterText <String>]
    [-Metadata <Hashtable>]
    [<CommonParameters>]

Description

The New-NMMReport cmdlet creates an NMMReportBuilder object used to build complex reports with multiple sections. Use Add-NMMReportSection to add data sections and Export-NMMReport to generate the final HTML file.

Parameters

-Title

Main title of the report. Displayed in the header.

Type String
Required True
Position 0

-Subtitle

Optional subtitle displayed below the title.

Type String
Required False

-LogoUrl

URL for a custom logo image. If not specified, uses the embedded Nerdio logo.

Type String
Required False

-Theme

Report theme.

Type String
Required False
Default light
Valid Values light, dark

-FooterText

Custom footer text.

Type String
Required False
Default "Generated by NMM-PS Module"

-Metadata

Optional hashtable of metadata to include in the report.

Type Hashtable
Required False

Examples

Example 1: Basic report

$report = New-NMMReport -Title "Monthly AVD Report"
$report | Add-NMMReportSection -Title "Host Pools" -Data $pools
$report | Export-NMMReport -OutputPath "./report.html"

Example 2: With subtitle and dark theme

$report = New-NMMReport -Title "Infrastructure Dashboard" -Subtitle "December 2024" -Theme dark

Example 3: Using splatting

$params = @{
    Title    = "NMM Complete Report"
    Subtitle = "Account 67 - $(Get-Date -Format 'MMMM yyyy')"
    Theme    = "light"
}
$report = New-NMMReport @params

Example 4: Custom branding

$report = New-NMMReport `
    -Title "Custom Report" `
    -LogoUrl "https://example.com/logo.png" `
    -FooterText "Generated by IT Operations"

Example 5: With metadata

$report = New-NMMReport -Title "Report" -Metadata @{
    GeneratedBy = "Automation Script"
    Environment = "Production"
}

Example 6: Full pipeline

New-NMMReport -Title "Dashboard" |
    Add-NMMReportSection -Title "Pools" -Data $pools -ShowChart -PassThru |
    Add-NMMReportSection -Title "Hosts" -Data $hosts -ShowChart -PassThru |
    Export-NMMReport -OutputPath "./dashboard.html" -OpenInBrowser

Outputs

NMMReportBuilder

The report builder object for pipeline operations with Add-NMMReportSection and Export-NMMReport.