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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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
Advocate II
Advocate 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

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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.