blog
Build a review-ready Word executive report from PowerShell

Word automation is easy when the target is a plain export. It becomes much more useful when the output is something a manager, auditor, or service owner can open, navigate, review, approve, and reuse without asking for the original script.
This showcase builds an editable executive service-health report from PowerShell objects. It shares the Excel dashboard's operational theme: services, owners, health signals, incidents, trends, and next actions. The compact example below creates a .docx with headings, tables, a chart, bookmarks, hyperlinks, content controls, footnotes, endnotes, and metadata. The full showcase adds more services, recommended actions, and watermarking.
/>Before you start
Use PowerShell 7 and install the public module versions used for this article:
Install-Module PSWriteOffice -RequiredVersion 3.0.7 -Scope CurrentUser
Import-Module PSWriteOffice -RequiredVersion 3.0.7
Run examples from a working folder where you can write the generated files. Supply your own inputs wherever a later example references an existing file or service.
What The Example Builds
The full showcase script creates a larger report than the compact example below. Its features include:
- a native opening panel built from Word paragraphs and tables
- header and footer content
- built-in and custom document properties
- a Word table of contents
- multiple heading levels
- a conditional service scorecard table
- a line chart for availability and incident trends
- a recommended-actions table
- bookmark and hyperlink navigation
- approval content controls
- watermarking
- one footnote and one endnote
- a read-back summary proving the document shape after generation
The input is ordinary PowerShell data. That is the point: the report is built from objects you already have in monitoring, inventory, compliance, or service-management scripts.
$services = @(
[pscustomobject]@{
Service = 'Identity Platform'
Owner = 'IAM'
Health = 96
Incidents = 1
Status = 'Healthy'
NextAction = 'Keep weekly drift review'
}
[pscustomobject]@{
Service = 'Certificate Lifecycle'
Owner = 'Security'
Health = 74
Incidents = 4
Status = 'Watch'
NextAction = 'Finish renewal automation rollout'
}
)
$trend = @(
[pscustomobject]@{ Month = 'Jan'; Availability = 99.20; Incidents = 8 }
[pscustomobject]@{ Month = 'Feb'; Availability = 99.34; Incidents = 7 }
[pscustomobject]@{ Month = 'Mar'; Availability = 99.55; Incidents = 6 }
[pscustomobject]@{ Month = 'Apr'; Availability = 99.61; Incidents = 5 }
[pscustomobject]@{ Month = 'May'; Availability = 99.73; Incidents = 4 }
[pscustomobject]@{ Month = 'Jun'; Availability = 99.82; Incidents = 3 }
)
$path = '.\Executive-Service-Health.docx'
Writing The Document
The Word DSL keeps the script close to how people think about reports: sections, headings, paragraphs, tables, charts, and review controls. The first page is intentionally Office-native. It does not depend on System.Drawing, desktop Word, or a pre-rendered bitmap.
$executiveSignals = @(
[pscustomobject]@{
Signal = 'Audience'
Detail = 'Technology leadership, service owners, and operational reviewers'
}
[pscustomobject]@{
Signal = 'Decision'
Detail = 'Approve the focused remediation plan for high-friction services'
}
)
$document = New-OfficeWord -Path $path -NoSave {
WordSection {
WordHeader {
WordParagraph {
WordBold 'PSWriteOffice Showcase'
WordText ' | Executive service health'
}
}
Set-OfficeWordDocumentProperty -Name Title -Value 'Executive Service Health Report'
Set-OfficeWordDocumentProperty -Name ShowcaseProduct -Value 'Word' -Custom
WordParagraph -Text 'Executive Service Health Report' -Style Heading1
WordParagraph 'Generated from PowerShell objects with PSWriteOffice and OfficeIMO.'
WordTable -InputObject $executiveSignals -Style GridTable5DarkAccent1 -Layout AutoFitToWindow
WordParagraph {
WordText 'This report turns service-health objects into an editable Word document.'
WordFootnote 'The sample uses synthetic data generated entirely in PowerShell.'
}
WordBookmark -Name 'ExecutiveSummary'
WordTableOfContents -Style Template1
}
}
-NoSave returns the live document. The following sections add to that same document, and the approval section saves and closes it once. The generated file remains a normal Word document that people can edit, review, and reuse.
Making Tables Useful
The scorecard is more than an object dump. Rows are formatted based on status, so readers can scan the document before reading every line.
WordParagraph -Document $document -Text 'Service Scorecard' -Style Heading1
WordTable -Document $document -InputObject $services -Style GridTable4Accent1 -Layout AutoFitToWindow {
WordTableCondition -FilterScript { $_.Status -eq 'Risk' } -BackgroundColor '#fde2e2'
WordTableCondition -FilterScript { $_.Status -eq 'Watch' } -BackgroundColor '#fff4cc'
WordTableCondition -FilterScript { $_.Status -eq 'Healthy' } -BackgroundColor '#e2f7e1'
}
That is the difference between "we exported data" and "we created something someone can use in a review meeting."
Charts, Notes, And Approvals
The showcase also demonstrates a Word line chart, approval controls, reviewer notes, and internal navigation.
WordChart -Document $document `
-Type Line `
-Data $trend `
-CategoryProperty Month `
-SeriesProperty Incidents `
-Title 'Monthly incident trend' `
-Legend `
-LegendPosition Bottom `
-XAxisTitle 'Month' `
-YAxisTitle 'Incidents' `
-FitToPageWidth
WordParagraph -Document $document {
WordHyperlink -Text 'Jump back to Executive Summary' -Anchor 'ExecutiveSummary' -Styled
}
WordParagraph -Document $document {
WordText 'Risk labels combine incidents, owner feedback, and observed trend.'
WordEndnote 'The scoring model is intentionally simple for the showcase.'
}
Approval fields are created as Word content controls, so the output is still easy to finish manually:
WordParagraph -Document $document {
WordText 'Approved for publication: '
WordCheckBox -Alias 'ApprovedForPublication' -Tag 'approval-publish'
}
WordParagraph -Document $document {
WordText 'Next review date: '
WordDatePicker -Date (Get-Date '2026-06-15') -Alias 'NextReviewDate'
}
WordParagraph -Document $document {
WordText 'Review status: '
WordDropDownList -Items 'Draft','Ready for review','Approved' -Alias 'ReviewStatus'
}
Update-OfficeWordTableOfContents -Document $document
$document | Close-OfficeWord -Save
Reading And Validating The Output
The example finishes by reopening the document and reporting what was created. This is useful for tests, demos, and CI logs.
$document = Get-OfficeWord -Path $path -ReadOnly
$reportShape = [pscustomobject]@{
Paragraphs = $document.Paragraphs.Count
Tables = $document.Tables.Count
Charts = $document.Charts.Count
ContentControls = $document.StructuredDocumentTags.Count
}
$document | Close-OfficeWord
$reportShape
The update command marks the table of contents for refresh when Word opens the document. Its cached placeholder may remain visible in readers that do not update fields. Update the table of contents in Word before distributing the final paginated report. Structural read-back lets you fail a build if the report loses its chart, content controls, or core tables:
if ($reportShape.Charts -lt 1) {
throw 'Expected at least one chart in the executive report.'
}
if ($reportShape.Tables -lt 2) {
throw 'Expected opening and scorecard tables.'
}
Performance And Scale
The fastest Word automation is not usually about micro-optimizing a paragraph. It is about using the right shape:
- Build data as PowerShell objects first, then pass arrays into
WordTableandWordChart. - Keep expensive read-back validation focused on structure, counts, and key fields.
- Use tables and styles instead of thousands of individually formatted runs.
- Generate without Microsoft Word installed, which keeps CI and server usage realistic.
- Save once at the end of the composition block instead of opening and closing the file repeatedly.
For large reports, split the document into predictable sections: summary, findings, evidence, action plan, and appendix. That keeps generation fast and keeps the final document easy to review.
More Report Ideas
The same pattern works for more than service health:
- Compliance attestation with owner sign-off controls.
- Change advisory reports with risk tables, bookmarks, and approval date pickers.
- Active Directory or Microsoft 365 assessments with findings, evidence links, and remediation tables.
- Monthly operations packs with trend charts, generated TOC, and hidden reviewer notes.
- Customer-facing delivery reports where metadata and internal navigation matter.
Why This Is A Product Showcase
This example exercises the things that make Word automation valuable in real projects: navigation, editable structure, review controls, metadata, evidence notes, and formatting that helps readers decide what matters.
OfficeIMO.Word provides the Open XML engine. PSWriteOffice makes the authoring layer feel like PowerShell: pass objects in, compose a report, save a real Office document, and verify the output. For scripts driven by loops and conditions instead of one composition block, the same commands also accept an explicit live document or paragraph target.