Forum Discussion
mbutler71
4 years agoAdvocate I
Get-PowerBICapacity Doesn't Work
Has anybody gotten this to work in PowerShell?
$caps = Get-PowerBICapacity -Scope Organization;
I've tried with my account, I'm a Capacity Admin, a service principal, and a generic account that has been added to the Capacity admins and contributors.
Thanks for any insight.
I've tried with my account, I'm a Capacity Admin, a service principal, and a generic account that has been added to the Capacity admins and contributors.
Thanks for any insight.
Hey kerski,
You have to login first before you can run the command. So your Power Shell should look like this:
Login-PowerBIServiceAccount Get-PowerBICapacity -Scope IndividualThis is as long as you are using the regular public enivronment for Power BI (Non-government cloud).
3 Replies
- kerskiAdvocate II
I have the issue too:
Get-PowerBICapacity : Login first with Login-PowerBIServiceAccount
At line:5 char:1
+ Get-PowerBICapacity -Scope Individual
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-PowerBICapacity], Exception
+ FullyQualifiedErrorId : System.Exception,Microsoft.PowerBI.Commands.Capacities.GetPowerBICapacity