Why PSWriteOffice?
PSWriteOffice brings the OfficeIMO document stack to PowerShell. The command surface shown here is generated from the current module manifest used for this release. Create, inspect, update, review, convert, secure, and deliver documents from scripts and automation jobs without maintaining a separate document engine.
Features
- Manifest-derived command catalog — cmdlets, aliases, and families are counted from the current module manifest
- DSL aliases — intuitive shorthand like
WordParagraph, ExcelSheet, and PptSlide for concise scripts - Broad document platform — Word, Excel, PowerPoint, PDF, Reader, Visio, Markdown, CSV, RTF, OpenDocument, email, AsciiDoc, LaTeX, and HTML asset workflows
- Cross-platform — PowerShell 7+ runs on Windows, Linux, and macOS
- PowerShell 5.1 and 7+ — supports Windows PowerShell 5.1 on Windows and modern PowerShell across platforms
Command families
The current module exports 478 cmdlets and 361 aliases across 16 documentation families. Cross-format commands have one documentation owner, so the family totals match the manifest.
| Family | Cmdlets | Typical work |
|---|
| Word | 91 | Create, inspect, update, review, merge, protect, and convert DOC and DOCX documents. |
| Excel | 155 | Build, read, convert, validate, repair, compare, and publish XLS and XLSX workbook workflows. |
| PowerPoint | 57 | Compose, inspect, update, import, theme, and render repeatable presentation decks. |
| PDF | 80 | Author, inspect, transform, sign, annotate, extract, preflight, and combine PDF files. |
| Reader and extraction | 13 | Detect formats and extract normalized documents, chunks, tables, visuals, assets, and ingest results. |
| Confluence Cloud | 7 | Plan and publish pages, preserve managed sections, and transfer attachments through OfficeIMO.Confluence. |
| Visio | 21 | Create, inspect, arrange, and export VSDX diagrams with built-in and imported stencils. |
| Markdown | 25 | Compose typed Markdown, parse documents, and convert between Markdown and HTML or Word. |
| RTF | 5 | Create, open, edit, inspect, and bridge Rich Text Format documents. |
| CSV | 5 | Create, import, inspect, and export delimited data with typed options. |
| OpenDocument | 5 | Create, read, and save ODT, ODS, and ODP workflows. |
| Email | 4 | Read and write messages and mailbox artifacts through the managed OfficeIMO.Email engine. |
| AsciiDoc | 4 | Read, create, update, and save bounded AsciiDoc workflows. |
| LaTeX | 4 | Read, create, update, and save bounded LaTeX interoperability workflows. |
| HTML assets | 1 | Export images and review surfaces used by document-to-HTML workflows. |
| Shared authoring primitives | 1 | Create reusable text runs shared by document DSLs. |
Browse the generated family guide or search the PowerShell API reference for parameter-level detail.
Start from a real workflow
Quick start
# Install the module
Install-Module PSWriteOffice -Force
# Create a Word document
New-OfficeWord -Path ".\Report.docx" {
Add-OfficeWordSection {
Add-OfficeWordParagraph -Style Heading1 -Text "Monthly Report"
Add-OfficeWordParagraph -Text "Generated on $(Get-Date -Format 'MMMM yyyy')"
$data = @(
[pscustomobject]@{ Region = "North"; Revenue = 42000; Target = 40000 }
[pscustomobject]@{ Region = "South"; Revenue = 38000; Target = 35000 }
[pscustomobject]@{ Region = "East"; Revenue = 29000; Target = 30000 }
[pscustomobject]@{ Region = "West"; Revenue = 51000; Target = 45000 }
)
Add-OfficeWordTable -InputObject $data -Style GridTable4Accent1
Add-OfficeWordParagraph {
Add-OfficeWordText -Text "All regions met or exceeded targets except East."
}
}
}
# Create an Excel workbook
New-OfficeExcel -Path ".\Metrics.xlsx" {
Add-OfficeExcelSheet -Name "Summary" {
Set-OfficeExcelCell -Address "A1" -Value "Metric"
Set-OfficeExcelCell -Address "B1" -Value "Value"
Set-OfficeExcelCell -Address "C1" -Value "Status"
Set-OfficeExcelCell -Address "A2" -Value "Uptime"
Set-OfficeExcelCell -Address "B2" -Value "99.97%"
Set-OfficeExcelCell -Address "C2" -Value "OK"
Set-OfficeExcelCell -Address "A3" -Value "Response Time"
Set-OfficeExcelCell -Address "B3" -Value "42ms"
Set-OfficeExcelCell -Address "C3" -Value "OK"
}
Add-OfficeExcelSheet -Name "Details" {
Set-OfficeExcelCell -Address "A1" -Value "Timestamp"
Set-OfficeExcelCell -Address "B1" -Value "Endpoint"
Set-OfficeExcelCell -Address "C1" -Value "Latency"
$rowIndex = 2
1..10 | ForEach-Object {
Set-OfficeExcelCell -Row $rowIndex -Column 1 -Value ((Get-Date).AddMinutes(-$_))
Set-OfficeExcelCell -Row $rowIndex -Column 2 -Value "/api/data"
Set-OfficeExcelCell -Row $rowIndex -Column 3 -Value (Get-Random -Minimum 20 -Maximum 80)
$rowIndex++
}
}
}
# Create a PowerPoint presentation
$ppt = New-OfficePowerPoint -FilePath ".\Status.pptx"
$slide = Add-OfficePowerPointSlide -Presentation $ppt
Add-OfficePowerPointTextBox -Slide $slide -Text "Weekly Status" -X 80 -Y 60 -Width 520 -Height 50
Add-OfficePowerPointBullets -Slide $slide -Bullets @(
"Shipped v3.2 to production",
"Resolved 14 customer tickets",
"Completed security audit"
) -X 80 -Y 150 -Width 520 -Height 220
$ppt | Save-OfficePowerPoint
Compatibility
| Platform | PowerShell Version | Supported |
|---|
| Windows | 5.1 | Yes |
| Windows | 7+ | Yes |
| Linux | 7+ | Yes |
| macOS | 7+ | Yes |
PSWriteOffice is available from the PowerShell Gallery and includes generated help for its cmdlet surface.