FabricTools v0.33.0 Public Preview

New-FabricEnvironment

Creates a new environment in a specified workspace.

Syntax

New-FabricEnvironment [-WorkspaceId] <guid> [-EnvironmentName] <string>
 [[-EnvironmentDescription] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Add-FabricEnvironment function creates a new environment within a given workspace by making a POST request to the Fabric API. The environment can optionally include a description.

Examples

Example 1

Creates an environment named "DevEnv" in workspace "12345" with the specified description.

Add-FabricEnvironment -WorkspaceId "12345" -EnvironmentName "DevEnv" -EnvironmentDescription "Development Environment"

Parameters

NameTypeReq.Pos.PipelineDescription
-EnvironmentName string ✓Required 1 –

(Mandatory) The name of the environment to be created. Only alphanumeric characters, spaces, and underscores are allowed.

-WorkspaceId guid ✓Required 0 –

(Mandatory) The ID of the workspace where the environment will be created.

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-EnvironmentDescription string 2 –

(Optional) A description of the environment.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

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.

Author: Tiago Balabuch, Kamil Nowinski