Commands › Power BI

Get-PowerBIDatasource

Power BI MicrosoftPowerBIMgmt Get-*

Returns a list of Power BI data sources.

Quick start script

# Get-PowerBIDatasource — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-PowerBIServiceAccount -ServicePrincipal -CertificateThumbprint $thumb -ApplicationId $appId -Tenant $tenantId

# 2. Run and inspect
Get-PowerBIDatasource -Dataset <Dataset> -DatasetId <Guid> -Id <Guid> | Format-List

# 3. Export for evidence / drift tracking
Get-PowerBIDatasource | Export-Clixml .\PowerBIDatasource-$(Get-Date -Format yyyyMMdd).xml

Syntax — 6 parameter sets

List (Default)

Get-PowerBIDatasource -DatasetId <Guid> [-WorkspaceId <Guid>] [-Scope <PowerBIUserScope>] [<CommonParameters>]

Id

Get-PowerBIDatasource -DatasetId <Guid> [-WorkspaceId <Guid>] -Id <Guid> [-Scope <PowerBIUserScope>]
 [<CommonParameters>]

Name

Get-PowerBIDatasource -DatasetId <Guid> [-WorkspaceId <Guid>] -Name <String> [-Scope <PowerBIUserScope>]
 [<CommonParameters>]

ObjectAndId

Get-PowerBIDatasource -Dataset <Dataset> [-WorkspaceId <Guid>] -Id <Guid> [-Scope <PowerBIUserScope>]
 [<CommonParameters>]

2 more parameter sets — see the parameter table below.

Parameters (6)

ParameterTypeRequiredWhat it controls
-Dataset Dataset yes Dataset for returning data sources for.
-DatasetId Guid yes ID of the dataset to return data sources for.
-Id Guid yes ID of the data source to return.
-Name String yes Name of the data source to return if one exists with that name. Case insensitive search.
-Scope PowerBIUserScope Indicates scope of the call. Individual returns only data sources assigned to the caller; Organization returns all data sources within a tenant (must be an administrator to initiate). Individual is the default.
-WorkspaceId Guid ID of the workspace to filter results to, data sources only belonging to that workspace are shown. Only available when -Scope is Individual.

Reference facts derived from Microsoft documentation, © Microsoft, licensed MIT; restructured with original guidance by serv365.ai.