Remove-FabricEnvironmentStagingLibrary
Deletes a specified library from the staging environment in a Microsoft Fabric workspace.
Syntax
Remove-FabricEnvironmentStagingLibrary [-WorkspaceId] <guid> [-EnvironmentId] <guid>
[-LibraryName] <string> [-WhatIf] [-Confirm] [<CommonParameters>]Description
This function allows for the deletion of a library from the staging environment, one file at a time. It ensures token validity, constructs the appropriate API request, and handles both success and failure responses.
Examples
Example 1
Deletes the specified library from the staging environment in the specified workspace.
Remove-FabricEnvironmentStagingLibrary -WorkspaceId "workspace-12345" -EnvironmentId "environment-67890" -LibraryName "library-to-delete"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -EnvironmentId | guid | ✓Required | 1 | – | The unique identifier of the staging environment containing the library. |
| -LibraryName | string | ✓Required | 2 | – | The name of the library to be deleted from the environment. |
| -WorkspaceId | guid | ✓Required | 0 | – | The unique identifier of the workspace from which the library is to be deleted. |
| -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. |
This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.
Notes
- Validates token expiration before making the API request.
- This function currently supports deleting one library at a time.
Author: Tiago Balabuch, Kamil Nowinski