Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

New-OfficeNotebook

Module
PSWriteOffice
Inputs
None
Outputs
OfficeIMO.Notebook.NotebookDocument

Creates a live Jupyter notebook that can be populated and saved without running cells.

Syntax

New-OfficeNotebook
[[-Path] <String>]
[<CommonParameters>]
#
Parameter set: All Parameter Sets

Examples

Author a notebook and save it.

$notebook = New-OfficeNotebook -Path ./lab.ipynb
$notebook | Add-OfficeNotebookCell -Kind Markdown -Source '# Lab notes'
$notebook | Add-OfficeNotebookCell -Kind Code -Language PowerShell -Source 'Get-Date'
$notebook | Save-OfficeNotebook
$notebook | Close-OfficeNotebook

Parameters

-Path String optionalposition: 0
Associates a default .ipynb save destination without writing it.

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.