Skip to content

Instantly share code, notes, and snippets.

@dgosbell
Created December 18, 2018 00:42
Show Gist options
  • Save dgosbell/612cf2751c6f66870a5a45316c6486cb to your computer and use it in GitHub Desktop.
Save dgosbell/612cf2751c6f66870a5a45316c6486cb to your computer and use it in GitHub Desktop.
## installs the PowerBIPS module if it's not already installed
if ((get-module MicrosoftPowerBIMgmt.Profile) -eq $null) { install-module PowerBIPS }
## login to PowerBI with credentials that have capacity management rights
Login-PowerBI
## lists the details of the available capacities
Invoke-PowerBIRestMethod -Method GET -Url "https://api.powerbi.com/v1.0/myorg/capacities"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment