Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

ConvertFrom-OfficeOneNote

Module
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.

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

Description

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

Examples

Convert a OneNote section to Markdown and inspect fidelity evidence.

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

Parameters

-FailOnLoss SwitchParameter optional
Fail when the selected projection reports an approximation or omission.
-Force SwitchParameter optional
Overwrite an existing destination.
-HtmlOptions HtmlOptions optional
HTML rendering settings used for .html output.
-NotebookOptions OneNoteNotebookReaderOptions optional
Notebook hierarchy, package, and section-error policy.
-OutputPath String requiredposition: 1aliases: OutPath
Destination .md, .html, or .pdf path.
-PassThruReport SwitchParameter optional
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 optional
Semantic layout and PDF settings used for .pdf output.
-ProjectionOptions OneNoteMarkdownOptions optional
OneNote hierarchy, history, and binary-asset projection settings.
-ReadOptions OneNoteReaderOptions optional
Bounded section and revision-store read options.

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.