Cmdlet
Open-OfficeNotebook
Opens a Jupyter notebook or imports a saved notebook source into the editable model.
Syntax
Open-OfficeNotebook
[-CompanionPath <String>]
[-DeepnoteNotebookId <String>]
[-FailOnLoss]
[-Format <NotebookImportFormat>]
[-LoadOptions <NotebookLoadOptions>]
[-Path] <String>
[-ScriptLanguage <String>]
[<CommonParameters>]#Parameter set:
PathOpen-OfficeNotebook
[-CompanionPath <String>]
[-DeepnoteNotebookId <String>]
[-FailOnLoss]
[-Format <NotebookImportFormat>]
-LiteralPath <String>
[-LoadOptions <NotebookLoadOptions>]
[-ScriptLanguage <String>]
[<CommonParameters>]#Parameter set:
LiteralPathDescription
Notebook cells remain inert. Close the returned document after using its source-backed values. Imported sources require an explicit .ipynb destination when saving.
Examples
Open a native notebook and inspect code cells.
$notebook = Open-OfficeNotebook -LiteralPath ./lab.ipynb
$notebook | Get-OfficeNotebookCell -Kind Code
$notebook | Close-OfficeNotebookImport a Jupytext script with a matching saved-output companion.
Open-OfficeNotebook -LiteralPath ./lab.py -Format JupytextPercent -CompanionPath ./lab.ipynb -FailOnLossParameters
- -CompanionPath String
- Literal path to a Jupyter notebook whose saved outputs may be matched to a Jupytext script.
- -DeepnoteNotebookId String
- Exact notebook identifier within a Deepnote project.
- -FailOnLoss SwitchParameter
- Reject source findings that describe fidelity loss.
- -Format NotebookImportFormat
- Explicit import profile for ambiguous source extensions. Omission uses native .ipynb or an unambiguous import extension.
- Possible values:
PolyglotDib,JupytextPercent,Quarto,MySTMarkdown,RMarkdown,RNotebookHtml,Deepnote,Zeppelin,PowerShellScript - -LoadOptions NotebookLoadOptions
- Native resource limits or a hashtable of limit properties, applied to input and companion files.
- -Path String
- Notebook path with FileSystem wildcard expansion.
- -ScriptLanguage String
- Optional language override for Jupytext percent comment markers.
- -LiteralPath String
- Literal notebook path, including FileInfo.FullName or provider PSPath from a pipeline.
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.