Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a script that runs on Friday and exports all reports from a given workspace to ensure that we have backups incase a report builder deletes a report.
Currently, I have it dynamically creating the folder for that friday's date and then exports the reports into it. However, I am using OneDrive as the file location and would like to leverage its version control (file history) capabilities by just overwriting the existing .pbix files in the backup folder.
Here is a snippet of what I am using for the Export-PowerBIReport command:
$filepath = $filepath_first + "\RandomName.pbix"
Export-PowerBIReport -Id $randompbix -OutFile $filepath
I have tried including the "-Force" command but keep getting the following error
"A parameter cannot be found that matches parameter name 'Force'."
Here is a snippet of what I tried:
$filepath = $filepath_first + "\RandomName.pbix"
Export-PowerBIReport -Id $randompbix -OutFile $filepath -Force
Any tips would be appreciated
Solved! Go to Solution.
Hi @sjrrkb123
Please refer to this blog to export power bi report by Power Shell:
PowerShell Scripts to Export Power BI Reports to PBIX/PDF/PPT
Please check the if PS "Run As Administrator" / or check if the FPE user (that installed the client) Run the PS window .
After that check again The cmdlets you used above.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sjrrkb123
Please refer to this blog to export power bi report by Power Shell:
PowerShell Scripts to Export Power BI Reports to PBIX/PDF/PPT
Please check the if PS "Run As Administrator" / or check if the FPE user (that installed the client) Run the PS window .
After that check again The cmdlets you used above.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |