SHARE
TWEET

Untitled

a guest Jun 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Install-Module -Name MicrosoftPowerBIMgmt
  2.  
  3. $myArray = @()
  4.  
  5. Login-PowerBIServiceAccount
  6. Get-PowerBIWorkspace -Scope Organization | ForEach-Object {
  7.         $ws = $_
  8.         Get-PowerBIReport -WorkspaceId $_.Id | ForEach-Object {
  9.             $x = [pscustomobject]@{
  10.                 workspaceId = $ws.Id
  11.                 workspaceName = $ws.Name
  12.                 reportId = $_.id
  13.                 reportName = $_.Name
  14.                 reportUrl = $_.WebUrl
  15.              }
  16.         $myArray += $x
  17.         }
  18. }
  19.  
  20. $myArray | Export-Csv "PowerBIWorkspaceReports.csv"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top