Get-FabricDataset
Retrieves one or more Power BI datasets from My Workspace or a specific workspace.
Syntax
Get-FabricDataset [[-WorkspaceId] <guid>] [[-DatasetId] <guid>] [[-DatasetName] <string>]
[<CommonParameters>]Description
Calls the Power BI REST API to list datasets. When GroupId is supplied the request targets a specific workspace (groups/{groupId}/datasets); otherwise it targets My Workspace (datasets).
Optionally filter the results to a single dataset by DatasetId or DatasetName.
Examples
Example 1
Retrieves all datasets from My Workspace.
Get-FabricDatasetExample 2
Retrieves all datasets from a specific workspace.
Get-FabricDataset -WorkspaceId "abcdef12-3456-7890-abcd-ef1234567890"Example 3
Retrieves a specific dataset by name from a workspace.
Get-FabricDataset -WorkspaceId "abcdef12-3456-7890-abcd-ef1234567890" -DatasetName "Sales Model"Example 4
Retrieves a specific dataset by ID from My Workspace.
Get-FabricDataset -DatasetId "12345678-90ab-cdef-1234-567890abcdef"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -DatasetId | guid | 1 | – | (Optional) The unique identifier of a specific dataset to return. Cannot be combined with |
|
| -DatasetName | string | 2 | – | (Optional) The display name of a specific dataset to return. Cannot be combined with |
|
| -WorkspaceIdalias: GroupId | guid | 0 | – | (Optional) The unique identifier of the workspace to query. When omitted, datasets from My Workspace are returned. |
This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.
Notes
- Requires a valid Power BI / Fabric token (call
Connect-FabricAccountfirst). - Calls
Confirm-TokenStateto ensure token validity before making the API request. - Callers with Read-only access to a workspace may receive a limited response (only
idandnamefields) from the in-group endpoint.
Author: Kamil Nowinski