Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 161
Forks 15
PowerShell Gallery downloads 158,661
Release v3.0.7
Language: C# Updated: 2026-09-19

API Reference

Cmdlet

ConvertFrom-OfficeOneNote

Namespace PSWriteOffice
Inputs
System.String
Outputs
System.IO.FileInfo OfficeIMO.OneNote.Markdown.OneNoteMarkdownConversionReport OfficeIMO.Html.HtmlConversionReport OfficeIMO.Pdf.PdfDocumentConversionResult

Converts an offline OneNote section or notebook to semantic Markdown, HTML, or PDF.

Remarks

Free-form canvas placement and unsupported native data are reported as conversion evidence rather than silently presented as lossless.

Examples

Authored help example

Convert a OneNote section to Markdown and inspect fidelity evidence.

PS>


$report = ConvertFrom-OfficeOneNote -Path .\Operations.one -OutputPath .\Operations.md -PassThruReport
            $report | Select-Object HasLoss, Diagnostics
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

ConvertFrom-OfficeOneNote [-FailOnLoss] [-Force] [-HtmlOptions <HtmlOptions>] [-NotebookOptions <OneNoteNotebookReaderOptions>] -OutputPath <String> [-PassThruReport] -Path <String> [-PdfOptions <OneNoteToPdfOptions>] [-ProjectionOptions <OneNoteMarkdownOptions>] [-ReadOptions <OneNoteReaderOptions>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

FailOnLoss SwitchParameter optionalposition: namedpipeline: False
Fail when the selected projection reports an approximation or omission.
Force SwitchParameter optionalposition: namedpipeline: False
Overwrite an existing destination.
HtmlOptions HtmlOptions optionalposition: namedpipeline: False
HTML rendering settings used for .html output.
NotebookOptions OneNoteNotebookReaderOptions optionalposition: namedpipeline: False
Notebook hierarchy, package, and section-error policy.
OutputPath String requiredposition: 1pipeline: Falsealiases: OutPath
Destination .md, .html, or .pdf path.
PassThruReport SwitchParameter optionalposition: namedpipeline: False
Return conversion evidence instead of file information.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
Path to a .one section, .onetoc2 notebook index, or .onepkg archive.
PdfOptions OneNoteToPdfOptions optionalposition: namedpipeline: False
Semantic layout and PDF settings used for .pdf output.
ProjectionOptions OneNoteMarkdownOptions optionalposition: namedpipeline: False
OneNote hierarchy, history, and binary-asset projection settings.
ReadOptions OneNoteReaderOptions optionalposition: namedpipeline: False
Bounded section and revision-store read options.

Outputs

System.IO.FileInfo, OfficeIMO.OneNote.Markdown.OneNoteMarkdownConversionReport, OfficeIMO.Html.HtmlConversionReport, OfficeIMO.Pdf.PdfDocumentConversionResult