New-PowerBIReport

Creates a Power BI report.

Syntax

New-PowerBIReport
   [-Path] <String>
   [-Name <String>]
   [-WorkspaceId <Guid>]
   [-ConflictAction <ImportConflictHandlerModeEnum>]
   [-Timeout <Int32>]
   [<CommonParameters>]
New-PowerBIReport
   [-Path] <String>
   [-Name <String>]
   [-Workspace <Workspace>]
   [-ConflictAction <ImportConflictHandlerModeEnum>]
   [-Timeout <Int32>]
   [<CommonParameters>]

Description

Loads a Power BI report from a pbix file and deploys it to the Power BI service. Before you run this command, make sure you log in using Connect-PowerBIServiceAccount.

Examples

Example 1

PS C:\> New-PowerBIReport -Path '.\report.pbix' -Name 'Report'

Adds the report to the personal Workspace.

Example 2

PS C:\> New-PowerBIReport -Path '.\report.pbix' -Name 'Report' -Workspace ( Get-PowerBIWorkspace -Name 'Team Workspace' )

Adds the report to the Team Workspace.

Parameters

-ConflictAction

Determines what to do if a dataset with the same name already exists. Default value is 'CreateOrOverwrite'

Type:ImportConflictHandlerModeEnum
Accepted values:Ignore, Abort, Overwrite, CreateOrOverwrite
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The report name. If not set, the file name will be used.

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

-Path

The path to the pbix file.

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

-Timeout

The number of seconds to wait for the service. If not set no timeout will be used.

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

-Workspace

The workspace to deploy the report to.

Type:Workspace
Aliases:Group
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceId

The id of the workspace to deploy the report to

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

Inputs

None

Outputs

Microsoft.PowerBI.Common.Api.Reports.Report