Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Meghmala
Regular Visitor

Export Power BI report template from a desktop report using powershell

I would like to know how to export Power BI template from a Power BI desktop report using power shell?

or perform this action using a C# application

 

I found this link on th web. But it seems like it is only for exporting reports .

https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.reports/export-powerbireport... 

 

Even using this give me the following error-

 

New-PowerBIReport : The term 'New-PowerBIReport' is not recognized as the name of a cmdlet, function, script fil

operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and

again.

At line:1 char:1

+ New-PowerBIReport -Path 'C:\abc\pqr\Lending  ...

+ ~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (New-PowerBIReport:String) [], CommandNotFoundException

    + FullyQualifiedErrorId : CommandNotFoundException

 

Could anybody please steer me in the correct direction?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Meghmala ,

As document mentioned, this script require objectid to export specific contents. I think you need to use report id to instead.

 

Spoiler

Parameters

-Id

ID of the report to export.

Type: Guid
Aliases: ReportId
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-OutFile

Output file to save the exported report to. Path must not already exist.

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

ID of the workspace containing the Power BI report to export.

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

 

In addition, did this report create on power bi service? Current export not works on online report.

Export a report from Power BI service to Desktop (Preview)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Meghmala ,

As document mentioned, this script require objectid to export specific contents. I think you need to use report id to instead.

 

Spoiler

Parameters

-Id

ID of the report to export.

Type: Guid
Aliases: ReportId
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-OutFile

Output file to save the exported report to. Path must not already exist.

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

ID of the workspace containing the Power BI report to export.

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

 

In addition, did this report create on power bi service? Current export not works on online report.

Export a report from Power BI service to Desktop (Preview)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi,

 

I am exploring the same similar feature "Export Power BI report template using PowerShell schript", but I couldn't find out the solution posted in this thread. Help me with the solution. Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.