Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  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"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement