New-FabricNotebook
Creates a new notebook in a specified Microsoft Fabric workspace.
Syntax
New-FabricNotebook [-WorkspaceId] <guid> [-NotebookName] <string> [[-NotebookDescription] <string>]
[[-NotebookPathDefinition] <string>] [[-NotebookPathPlatformDefinition] <string>] [-WhatIf]
[-Confirm] [<CommonParameters>]Description
This function sends a POST request to the Microsoft Fabric API to create a new notebook in the specified workspace. It supports optional parameters for notebook description and path definitions for the notebook content.
Examples
Example 1
Creates a new notebook in the specified workspace with a given name and path definition.
New-FabricNotebook -WorkspaceId "workspace-12345" -NotebookName "New Notebook" -NotebookPathDefinition "C:\notebooks\example.ipynb"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -NotebookName | string | ✓Required | 1 | – | The name of the notebook to be created. |
| -WorkspaceId | guid | ✓Required | 0 | – | The unique identifier of the workspace where the notebook will be created. |
| -Confirmalias: cf | switch | Named | – | Prompts you for confirmation before running the cmdlet. |
|
| -NotebookDescription | string | 2 | – | An optional description for the notebook. |
|
| -NotebookPathDefinition | string | 3 | – | An optional path to the notebook definition file (e.g., .ipynb file) to upload. |
|
| -NotebookPathPlatformDefinition | string | 4 | – | An optional path to the platform-specific definition (e.g., .platform file) to upload. |
|
| -WhatIfalias: wi | switch | Named | – | Runs the command in a mode that only reports what would happen without performing the actions. |
This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.
Notes
- Requires
$FabricConfigglobal configuration, includingBaseUrlandFabricHeaders. - Calls
Confirm-TokenStateto ensure token validity before making the API request.
Author: Tiago Balabuch, Kamil Nowinski