Export-FabricItem
Exports items from a Fabric workspace. Either all items in a workspace or a specific item.
Syntax
Export-FabricItem [[-path] <string>] [[-WorkspaceId] <guid>] [[-filter] <scriptblock>]
[[-itemID] <guid>] [<CommonParameters>]Description
The Export-FabricItem function exports items from a Fabric workspace to a specified directory. It can export items of type "Report", "SemanticModel", "SparkJobDefinitionV1" or "Notebook". If a specific item ID is provided, only that item will be exported. Otherwise, all items in the workspace will be exported.
Examples
Example 1
This example exports all items from the Fabric workspace with the specified ID to the "C:\ExportedItems" directory.
Export-FabricItem -workspaceId "12345678-1234-1234-1234-1234567890AB" -path "C:\ExportedItems"Example 2
This example exports the item with the specified ID from the Fabric workspace with the specified ID to the "C:\ExportedItems" directory.
Export-FabricItem -workspaceId "12345678-1234-1234-1234-1234567890AB" -itemID "98765432-4321-4321-4321-9876543210BA" -path "C:\ExportedItems"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -filter | scriptblock | 2 | – | A script block used to filter the items to be exported. Only items that match the filter will be exported. The default filter includes items of type "Report", "SemanticModel", "SparkJobDefinitionV1" or "Notebook". Default: { $_.type -in @("Report", "SemanticModel", "Notebook", "SparkJobDefinitionV1") } |
|
| -itemID | guid | 3 | – | The ID of the specific item to export. If provided, only that item will be exported. |
|
| -path | string | 0 | – | The path to the directory where the items will be exported. The default value is '.\pbipOutput'. Default: .\pbipOutput |
|
| -WorkspaceId | guid | 1 | – | The ID of the Fabric workspace. |
This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.
Notes
Author: Rui Romano
This function is based on the Export-FabricItems function written by Rui Romano. https://github.com/microsoft/Analysis-Services/tree/master/pbidevmode/fabricps-pbip