FabricTools v0.33.0 Public Preview

Get-FabricEnvironment

Retrieves an environment or a list of environments from a specified workspace in Microsoft Fabric.

Syntax

Get-FabricEnvironment [-WorkspaceId] <guid> [[-EnvironmentId] <guid>] [[-EnvironmentName] <string>]
 [<CommonParameters>]

Description

The Get-FabricEnvironment function sends a GET request to the Fabric API to retrieve environment details for a given workspace. It can filter the results by EnvironmentName.

Examples

Example 1

Retrieves the "Development" environment from workspace "12345".

Get-FabricEnvironment -WorkspaceId "12345" -EnvironmentName "Development"

Example 2

Retrieves all environments in workspace "12345".

Get-FabricEnvironment -WorkspaceId "12345"

Parameters

NameTypeReq.Pos.PipelineDescription
-WorkspaceId guid ✓Required 0 –

(Mandatory) The ID of the workspace to query environments.

-EnvironmentId guid 1 –

(Optional) The ID of a specific environment to retrieve.

-EnvironmentName string 2 –

(Optional) The name of the specific environment to retrieve.

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

Notes

  • Calls Confirm-TokenState to ensure token validity before making the API request.
  • Returns the matching environment details or all environments if no filter is provided.

Author: Tiago Balabuch, Kamil Nowinski