Edit

Share via


Get-PowerBIWorkspace

Returns a list of Power BI workspaces.

Syntax

List (Default)

Get-PowerBIWorkspace
    [-Scope <PowerBIUserScope>]
    [-Filter <String>]
    [-User <String>]
    [-Deleted]
    [-Orphaned]
    [-Type <WorkspaceType>]
    [-First <Int32>]
    [-Skip <Int32>]
    [-Include <ArtifactType[]>]
    [<CommonParameters>]

Id

Get-PowerBIWorkspace
    -Id <Guid>
    [-Scope <PowerBIUserScope>]
    [-Type <WorkspaceType>]
    [-Include <ArtifactType[]>]
    [<CommonParameters>]

Name

Get-PowerBIWorkspace
    -Name <String>
    [-Scope <PowerBIUserScope>]
    [-Type <WorkspaceType>]
    [-Include <ArtifactType[]>]
    [<CommonParameters>]

All

Get-PowerBIWorkspace
    [-Scope <PowerBIUserScope>]
    [-Filter <String>]
    [-User <String>]
    [-Deleted]
    [-Orphaned]
    [-Type <WorkspaceType>]
    [-Include <ArtifactType[]>]
    [-All]
    [<CommonParameters>]

Description

Retrieves a list of Power BI workspaces that match the specified search criteria and scope. By default (without -First parameter) it shows the first 100 workspaces assigned to the user. Use -First and -Skip to fetch more workspaces or use -All to return all workspaces. The -First parameter can be used to return at most 5000 workspaces. Before you run this command, make sure you log in using Connect-PowerBIServiceAccount.

Examples

Example 1

PS C:\> Get-PowerBIWorkspace

Returns the first 100 Power BI workspaces the calling user is assigned to (-Scope Individual).

Example 2

PS C:\> Get-PowerBIWorkspace -All

Returns all Power BI workspaces the calling user is assigned to.

Example 3

PS C:\> Get-PowerBIWorkspace -Scope Organization -Filter "tolower(name) eq 'contoso sales'"

Returns a workspace named 'Contoso Sales' (case insensitive with tolower) within the user's organization.

Example 3

PS C:\> Get-PowerBIWorkspace -Scope Organization -Include All

Returns all Power BI workspaces along with related reports, dashboards, datasets, dataflows and workbooks within the user's organization.

Parameters

-All

Indicates to show all the workspaces. -First and -Skip cannot be used with this parameter.

Parameter properties

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

Parameter sets

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

-Deleted

Indicates to show only deleted workspaces. Only supported when -Scope Organization is specified.

Parameter properties

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

Parameter sets

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

-Filter

OData filter, case-sensitive (element names start lowercase).

Parameter properties

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

Parameter sets

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

-First

First (top) list of results. This value defaults to 100.

Parameter properties

Type:Int32
Default value:100
Supports wildcards:False
DontShow:False
Aliases:Top

Parameter sets

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

-Id

ID of the workspace to return.

Parameter properties

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

Parameter sets

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

-Include

Retrieves related artifacts associated with the Power BI workspace. Only available when -Scope is Organization.

Parameter properties

Type:

ArtifactType[]

Default value:None
Accepted values:Reports, Dashboards, Datasets, Dataflows, Workbooks, All
Supports wildcards:False
DontShow:False
Aliases:Expand

Parameter sets

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

-Name

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

Parameter properties

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

Parameter sets

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

-Orphaned

Indicates to show only orphaned workspaces. Only supported when -Scope Organization is specified.

Parameter properties

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

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
All
Position:Named
Mandatory:False
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 workspaces assigned to the caller; Organization returns all workspaces 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

-Skip

Skips the first set of results.

Parameter properties

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

Parameter sets

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

-Type

Type of the workspace to return. Case sensitive search.

Parameter properties

Type:WorkspaceType
Default value:None
Accepted values:Workspace, Group, PersonalGroup
Supports wildcards:False
DontShow:False

Parameter sets

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

-User

Filter workspaces to show ones which the user is contained within. Only available when -Scope is Organization.

Parameter properties

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

Parameter sets

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

None

Outputs

System.Collections.Generic.IEnumerable`1