New-FabricWorkspace
Creates a new Fabric workspace with the specified display name.
Syntax
New-FabricWorkspace [-WorkspaceName] <string> [[-WorkspaceDescription] <string>]
[[-CapacityId] <guid>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
The New-FabricWorkspace function creates a new workspace in the Fabric platform by sending a POST request to the API. It validates the display name and handles both success and error responses.
Examples
Example 1
Creates a workspace named "NewWorkspace".
New-FabricWorkspace -WorkspaceName "NewWorkspace"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -WorkspaceName | string | ✓Required | 0 | – | The display name of the workspace to be created. Must only contain alphanumeric characters, spaces, and underscores. |
| -CapacityId | guid | 2 | – | (Optional) The ID of the capacity to be associated with the workspace. This parameter is optional. |
|
| -Confirmalias: cf | switch | Named | – | Prompts you for confirmation before running the cmdlet. |
|
| -WhatIfalias: wi | switch | Named | – | Runs the command in a mode that only reports what would happen without performing the actions. |
|
| -WorkspaceDescription | string | 1 | – | (Optional) A description for the workspace. This parameter is optional. |
This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.
Notes
- Requires
Confirm-TokenStateto ensure token validity before making the API request.
Author: Tiago Balabuch, Kamil Nowinski