Update-FabricNotebookDefinition
Updates the definition of a notebook in a Microsoft Fabric workspace.
Syntax
Update-FabricNotebookDefinition [-WorkspaceId] <guid> [-NotebookId] <guid>
[-NotebookPathDefinition] <string> [[-NotebookPathPlatformDefinition] <string>] [-WhatIf]
[-Confirm] [<CommonParameters>]Description
This function allows updating the content or metadata of a notebook in a Microsoft Fabric workspace. The notebook content can be provided as file paths, and metadata updates can optionally be enabled.
Examples
Example 1
Updates the content of the notebook with ID 67890 in the workspace 12345 using the specified notebook file.
Update-FabricNotebookDefinition -WorkspaceId "12345" -NotebookId "67890" -NotebookPathDefinition "C:\Notebooks\Notebook.ipynb"Example 2
Updates both the content and metadata of the notebook with ID 67890 in the workspace 12345.
Update-FabricNotebookDefinition -WorkspaceId "12345" -NotebookId "67890" -NotebookPathDefinition "C:\Notebooks\Notebook.ipynb" -NotebookPathPlatformDefinition "C:\Notebooks\.platform"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -NotebookId | guid | ✓Required | 1 | – | (Mandatory) The unique identifier of the notebook to be updated. |
| -NotebookPathDefinition | string | ✓Required | 2 | – | (Mandatory) The file path to the notebook content definition file. The content will be encoded as Base64 and sent in the request. |
| -WorkspaceId | guid | ✓Required | 0 | – | (Mandatory) The unique identifier of the workspace where the notebook resides. |
| -Confirmalias: cf | switch | Named | – | Prompts you for confirmation before running the cmdlet. |
|
| -NotebookPathPlatformDefinition | string | 3 | – | (Optional) The file path to the notebook's platform-specific definition file. The content will be encoded as Base64 and sent in the request. |
|
| -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. - The notebook content is encoded as Base64 before being sent to the Fabric API.
- This function handles asynchronous operations and retrieves operation results if required.
Author: Tiago Balabuch, Kamil Nowinski