New-FabricWorkspaceUsageMetricsReport
Retrieves the workspace usage metrics dataset ID.
Syntax
New-FabricWorkspaceUsageMetricsReport [-WorkspaceId] <guid> [-WhatIf] [-Confirm]
[<CommonParameters>]Description
The New-FabricWorkspaceUsageMetricsReport function retrieves the workspace usage metrics dataset ID. It supports multiple aliases for flexibility.
Examples
Example 1
This example retrieves the workspace usage metrics dataset ID for a specific workspace given the workspace ID.
New-FabricWorkspaceUsageMetricsReport -workspaceId "your-workspace-id"Parameters
| Name | Type | Req. | Pos. | Pipeline | Description |
|---|---|---|---|---|---|
| -WorkspaceIdalias: Id | guid | ✓Required | 0 | – | The ID of the workspace. This is a mandatory parameter. |
| -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
The function retrieves the PowerBI access token and the Fabric API cluster URI. It then makes a GET request to the Fabric API to retrieve the workspace usage metrics dataset ID, parses the response and replaces certain keys to match the expected format, and returns the 'dbName' property of the first model in the response, which is the dataset ID.
Author: Ioana Bouariu