Blog Post

Added another 3 new PowerShell functions for reports on Power BI Report Server

,

I finally did it. I created a function I’ve been wanting to be able to use for *years*. Test-RsRestItemDataSource is here.

I can’t tell you how many times I’ve started to work on a report I was told was working, only to find the connection info was invalid. This wastes valuable time, especially when you’ve already made changes to the report.

Other times, I’ve been asked to figure out why a bunch of subscriptions weren’t working, only to find out it was a simple connection issue. I’ve always wanted a simple PowerShell command to check the credentials of a bunch of reports before I touch anything.

Turns out, it wasn’t that hard to build at all. I only wish I had built it years ago.

This command will check every credential within your report, and will return the success/failure of each connection separately. I have built this command to work with both Power BI reports & Paginated reports on Power BI Report Server. I used the REST API so these commands are available on PowerShell 7.

While I was working on the ReportingServicesTools module I added two more commands as well. I added Get-RsRestCacheRefreshPlanHistory for checking the success/failure of last few refreshes of a Power BI report. I built this command to help me find out when a report refresh stopped working.

I also built Get-RsRestItemAccessPolicy which is basically a re-creation of the Get-RsCatalogItemRole command, but using the REST API instead of the SOAP API. I have more work I plan to do to create [ Grant | Revoke ] commands. But first I need to learn how to add & subtract ( INSERT / DELETE ) lines of JSON from PowerShell. ??

The post Added another 3 new PowerShell functions for reports on Power BI Report Server first appeared on SQLvariations: SQL Server, a little PowerShell, maybe some Power BI.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating