Get-PowerBIDatasource

Returns a list of Power BI data sources.

Syntax

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

Description

Retrieves a list of Power BI data sources under the specified dataset along that match the specified search criteria and scope. Before you run this command, make sure you log in using Connect-PowerBIServiceAccount.

Examples

Example 1

PS C:\> Get-PowerBIDatasource -DatasetId 23d088a0-a395-483e-b81c-54f51f3e4e3c

Returns all data sources in Power BI dataset with ID 23d088a0-a395-483e-b81c-54f51f3e4e3c, for dataset the calling user has access to.

Example 2

PS C:\> Get-PowerBIDatasource -DatasetId 23d088a0-a395-483e-b81c-54f51f3e4e3c -Scope Organization

Returns all data sources in Power BI dataset with ID 23d088a0-a395-483e-b81c-54f51f3e4e3c, for a dataset in the calling user's organization.

Parameters

-Dataset

Dataset for returning data sources for.

Type:Dataset
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DatasetId

ID of the dataset to return data sources for.

Type:Guid
Aliases:DatasetKey
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Id

ID of the data source to return.

Type:Guid
Aliases:DatasourceId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Name of the data source to return if one exists with that name. Case insensitive search.

Type:String
Aliases:DatasoureName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Scope

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.

Type:PowerBIUserScope
Accepted values:Individual, Organization
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceId

ID of the workspace to filter results to, data sources only belonging to that workspace are shown. Only available when -Scope is Individual.

Type:Guid
Aliases:GroupId
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.PowerBI.Common.Api.Datasets.Dataset

Outputs

System.Object