Edit

Share via


Get-PowerBIDatasource

Returns a list of Power BI data sources.

Syntax

List (Default)

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

Id

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

Name

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

ObjectAndId

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

ObjectAndName

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

ObjectAndList

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.

Parameter properties

Type:Dataset
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ObjectAndId
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectAndName
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectAndList
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-DatasetId

ID of the dataset to return data sources for.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DatasetKey

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Id
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Name
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

ID of the data source to return.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DatasourceId

Parameter sets

Id
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectAndId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DatasoureName

Parameter sets

Name
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ObjectAndName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:PowerBIUserScope
Default value:None
Accepted values:Individual, Organization
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False
Aliases:GroupId

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.PowerBI.Common.Api.Datasets.Dataset

Outputs

System.Object