You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by Kevin Chant showing his PowerShell code to start a notebook (during SQLBits 2026).
The function should invoke a given notebook (by name or id) and (by default) wait for completion.
Behavior
Require WorkspaceId and exactly one of NotebookId or NotebookName.
Wait for completion by default. Allow callers to opt out and return the submitted job instance promptly.
When waiting, poll until the job reaches a terminal state, honoring the API's Retry-After header. Return the final job status and surface failure details when execution fails.
Support -WhatIf so callers can preview the operation without starting the notebook.
Implementation details
Resolve notebook names within the specified workspace; report not-found and ambiguous-name cases instead of selecting an arbitrary notebook.
Submit a RunNotebook job through the Fabric Job Scheduler API.
Poll the job-instance URL returned by the submit response. This is a job-instance workflow, not the generic long-running-operation flow that polls using x-ms-operation-id.
Defer notebook parameters and compute/environment configuration from the initial implementation unless they are needed for the core use case.
Activity