Import a PBIX to PowerBI using PowerShell

Reading up on the PowerBI API to import PBIX files to the PowerBI service and an example on the actual request I decided to write a PowerShell function to import a PowerBI PBIX file to the PowerBI service.

The PowerBI Import API is quite specific and kept giving me 400’s like:

  • “Bad Request” with no details
  • UnknownError pbi.error exceptionCulprit 1 (loved this one)
  • MultiPartMimeStreamFormatException
  • RequestedFileIsEncryptedOrCorrupted

Eventually I figured out how to import my reports directly into PowerBI, so to help you automate importing your reports into workspaces or directly to customers using PowerShell, I’ll share my PowerShell function with you:

GitLab: Import-PBIXToPowerBI.ps1

5
Leave a Reply

avatar
2 Comment threads
3 Thread replies
3 Followers
 
Most reacted comment
Hottest comment thread
3 Comment authors
JosgauchetMatt Duguid Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
newest oldest most voted
Notify of
gauchet
Guest
gauchet
Matt Duguid
Guest
Matt Duguid

We too are also receiving the http/400 and error “UnknownError pbi.error exceptionCulprit 1” can you please advise what specifically fixes that?