Muokkaa

Jaa


Get-PowerBIWorkspace

Returns a list of Power BI workspaces.

Syntax

Get-PowerBIWorkspace
   [-Scope <PowerBIUserScope>]
   [-Filter <String>]
   [-User <String>]
   [-Deleted]
   [-Orphaned]
   [-Type <WorkspaceType>]
   [-First <Int32>]
   [-Skip <Int32>]
   [-Include <ArtifactType[]>]
   [<CommonParameters>]
Get-PowerBIWorkspace
   -Id <Guid>
   [-Scope <PowerBIUserScope>]
   [-Type <WorkspaceType>]
   [-Include <ArtifactType[]>]
   [<CommonParameters>]
Get-PowerBIWorkspace
   -Name <String>
   [-Scope <PowerBIUserScope>]
   [-Type <WorkspaceType>]
   [-Include <ArtifactType[]>]
   [<CommonParameters>]
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.

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

-Deleted

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

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

-Filter

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

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

-First

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

Type:Int32
Aliases:Top
Position:Named
Default value:100
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

ID of the workspace to return.

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

-Include

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

Type:ArtifactType[]
Aliases:Expand
Accepted values:Reports, Dashboards, Datasets, Dataflows, Workbooks, All
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

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

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

-Orphaned

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-Skip

Skips the first set of results.

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

-Type

Type of the workspace to return. Case sensitive search.

Type:WorkspaceType
Accepted values:Workspace, Group, PersonalGroup
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-User

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

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

Inputs

None

Outputs

System.Collections.Generic.IEnumerable`1[[Microsoft.PowerBI.Common.Api.Workspaces.Workspace, Microsoft.PowerBI.Common.Api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]