FabricTools v0.33.0 Public Preview

Get-FabricCapacity

Retrieves capacity details from a specified Microsoft Fabric workspace.

Syntax

Get-FabricCapacity [[-capacityId] <guid>] [[-capacityName] <string>] [<CommonParameters>]

Description

This function retrieves capacity details from a specified workspace using either the provided capacityId or capacityName. It handles token validation, constructs the API URL, makes the API request, and processes the response.

Examples

Example 1

This example retrieves the capacity details for the capacity with ID "capacity-12345".

Get-FabricCapacity -capacityId "capacity-12345"

Example 2

This example retrieves the capacity details for the capacity named "MyCapacity".

Get-FabricCapacity -capacityName "MyCapacity"

Parameters

NameTypeReq.Pos.PipelineDescription
-capacityId guid 0 –

The unique identifier of the capacity to retrieve. This parameter is optional.

-capacityName string 1 –

The name of the capacity to retrieve. This parameter is optional.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Requires $FabricConfig global configuration, including BaseUrl and FabricHeaders.
  • Calls Confirm-TokenState to ensure token validity before making the API request.

Author: Tiago Balabuch