Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mbutler71
Advocate I
Advocate 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. 
1 ACCEPTED SOLUTION

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 Individual

 This is as long as you are using the regular public enivronment for Power BI (Non-government cloud).


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

View solution in original post

3 REPLIES 3
kerski
Helper I
Helper I

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

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 Individual

 This is as long as you are using the regular public enivronment for Power BI (Non-government cloud).


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Watsky
Solution Sage
Solution Sage

Hey @mbutler71 ,

Seems to be working fine for me. What error are you receiving?


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.