FabricTools.psd1

#
# Module manifest for module 'FabricTools'
#
# Generated by: The FabricTools Team
#
# Generated on: 26/05/2025
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'FabricTools.psm1'

# Version number of this module.
ModuleVersion = '0.34.0'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID              = 'f2a0f9e6-fab6-41fc-9e1c-0c94ff38f794'

# Author of this module
Author            = 'The FabricTools Team'

CompanyName       = 'fabrictools.io'

# Copyright statement for this module
Copyright         = 'Copyright (c) 2025 by FabricTools Team'

# Description of the functionality provided by this module
Description       = 'A module to be able to do more with Microsoft Fabric.
    It lets you pause and resume Fabric capacities.
    Adds functionality previously only available with the REST API as PowerShell functions.
    There are also functions to make it easier to monitor usage metrics and refreshes.'


# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.1'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(
    @{ ModuleName = 'Az.Accounts' ; ModuleVersion = '5.0.0' },
    @{ ModuleName = 'Az.Resources' ; ModuleVersion = '6.15.1' },
    @{ ModuleName = 'PSFramework' ; ModuleVersion = '1.13.426' }
)

# Assemblies that must be loaded prior to importing this module.
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module.
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Get-FabricCapacities','Get-FabricCapacity','Get-FabricCapacityRefreshables','Get-FabricCapacitySkus','Get-FabricCapacityState','Get-FabricCapacityTenantOverrides','Get-FabricCapacityWorkload','Resume-FabricCapacity','Suspend-FabricCapacity','Update-FabricCapacity','Get-FabricConfig','Get-FabricCopyJob','Get-FabricCopyJobDefinition','New-FabricCopyJob','Remove-FabricCopyJob','Update-FabricCopyJob','Update-FabricCopyJobDefinition','Get-FabricDashboard','Get-FabricDataPipeline','New-FabricDataPipeline','Remove-FabricDataPipeline','Start-FabricDataPipeline','Update-FabricDataPipeline','Get-FabricDatamart','Get-FabricDataset','Get-FabricDatasetRefreshHistory','Invoke-FabricDatasetRefresh','Add-FabricWorkspaceToStage','Get-FabricDeploymentPipeline','Get-FabricDeploymentPipelineOperation','Get-FabricDeploymentPipelineRoleAssignments','Get-FabricDeploymentPipelineStage','Get-FabricDeploymentPipelineStageItem','New-FabricDeploymentPipeline','Remove-FabricDeploymentPipeline','Remove-FabricWorkspaceFromStage','Start-FabricDeploymentPipelineStage','Add-FabricDomainWorkspaceAssignmentByCapacity','Add-FabricDomainWorkspaceAssignmentById','Add-FabricDomainWorkspaceAssignmentByPrincipal','Add-FabricDomainWorkspaceRoleAssignment','Get-FabricDomain','Get-FabricDomainWorkspace','New-FabricDomain','Remove-FabricDomain','Remove-FabricDomainWorkspaceAssignment','Remove-FabricDomainWorkspaceRoleAssignment','Update-FabricDomain','Get-FabricEnvironment','Get-FabricEnvironmentLibrary','Get-FabricEnvironmentSparkCompute','Get-FabricEnvironmentStagingLibrary','Get-FabricEnvironmentStagingSparkCompute','Import-FabricEnvironmentStagingLibrary','New-FabricEnvironment','Publish-FabricEnvironment','Remove-FabricEnvironment','Remove-FabricEnvironmentStagingLibrary','Stop-FabricEnvironmentPublish','Update-FabricEnvironment','Update-FabricEnvironmentStagingSparkCompute','Get-FabricEventhouse','Get-FabricEventhouseDefinition','New-FabricEventhouse','Remove-FabricEventhouse','Update-FabricEventhouse','Update-FabricEventhouseDefinition','Get-FabricEventstream','Get-FabricEventstreamDefinition','New-FabricEventstream','Remove-FabricEventstream','Update-FabricEventstream','Update-FabricEventstreamDefinition','Get-FabricExternalDataShares','Revoke-FabricExternalDataShares','Connect-FabricGit','Disconnect-FabricGit','Get-FabricGitConnection','Get-FabricGitCredential','Get-FabricGitStatus','Initialize-FabricGitConnection','Invoke-FabricGitCommit','Invoke-FabricGitUpdate','Update-FabricGitCredential','Export-FabricItem','Get-FabricItem','Get-FabricItemJobInstance','Get-FabricItemSchedule','Import-FabricItem','New-FabricItemSchedule','Remove-FabricItem','Remove-FabricItemSchedule','Update-FabricItemSchedule','Get-FabricKQLDashboard','Get-FabricKQLDashboardDefinition','New-FabricKQLDashboard','Remove-FabricKQLDashboard','Update-FabricKQLDashboard','Update-FabricKQLDashboardDefinition','Get-FabricKQLDatabase','Get-FabricKQLDatabaseDefinition','New-FabricKQLDatabase','Remove-FabricKQLDatabase','Update-FabricKQLDatabase','Update-FabricKQLDatabaseDefinition','Get-FabricKQLQueryset','Get-FabricKQLQuerysetDefinition','Invoke-FabricKQLCommand','New-FabricKQLQueryset','Remove-FabricKQLQueryset','Update-FabricKQLQueryset','Update-FabricKQLQuerysetDefinition','Get-FabricLakehouse','Get-FabricLakehouseTable','New-FabricLakehouse','Remove-FabricLakehouse','Start-FabricLakehouseTableMaintenance','Update-FabricLakehouse','Write-FabricLakehouseTableData','Get-FabricMirroredDatabase','Get-FabricMirroredDatabaseDefinition','Get-FabricMirroredDatabaseStatus','Get-FabricMirroredDatabaseTableStatus','New-FabricMirroredDatabase','Remove-FabricMirroredDatabase','Start-FabricMirroredDatabaseMirroring','Stop-FabricMirroredDatabaseMirroring','Update-FabricMirroredDatabase','Update-FabricMirroredDatabaseDefinition','Get-FabricMirroredWarehouse','Get-FabricMLExperiment','New-FabricMLExperiment','Remove-FabricMLExperiment','Update-FabricMLExperiment','Get-FabricMLModel','New-FabricMLModel','Remove-FabricMLModel','Update-FabricMLModel','Get-FabricNotebook','Get-FabricNotebookDefinition','New-FabricNotebook','Remove-FabricNotebook','Start-FabricNotebook','Update-FabricNotebook','Update-FabricNotebookDefinition','Get-FabricPaginatedReport','Update-FabricPaginatedReport','Get-FabricReflex','Get-FabricReflexDefinition','New-FabricReflex','Remove-FabricReflex','Update-FabricReflex','Update-FabricReflexDefinition','Get-FabricReport','Get-FabricReportDefinition','New-FabricReport','Remove-FabricReport','Update-FabricReport','Update-FabricReportDefinition','Get-FabricSemanticModel','Get-FabricSemanticModelDefinition','New-FabricSemanticModel','Remove-FabricSemanticModel','Update-FabricSemanticModel','Update-FabricSemanticModelDefinition','Get-FabricSparkCustomPool','Get-FabricSparkSettings','New-FabricSparkCustomPool','Remove-FabricSparkCustomPool','Update-FabricSparkCustomPool','Update-FabricSparkSettings','Get-FabricSparkJobDefinition','Get-FabricSparkJobDefinitionDefinition','New-FabricSparkJobDefinition','Remove-FabricSparkJobDefinition','Start-FabricSparkJobDefinitionOnDemand','Update-FabricSparkJobDefinition','Update-FabricSparkJobDefinitionDefinition','Get-FabricSQLDatabase','New-FabricSQLDatabase','Remove-FabricSQLDatabase','Get-FabricSQLEndpoint','Refresh-FabricSQLEndpoint','Get-FabricCapacityTenantSettingOverrides','Get-FabricDomainTenantSettingOverrides','Get-FabricTenantSetting','Get-FabricWorkspaceTenantSettingOverrides','Revoke-FabricCapacityTenantSettingOverrides','Update-FabricCapacityTenantSettingOverrides','Update-FabricTenantSetting','Get-FabricUserListAccessEntities','Convert-FromBase64','Convert-ToBase64','Get-FabricLongRunningOperation','Get-FabricLongRunningOperationResult','Get-FabricWarehouse','New-FabricWarehouse','Remove-FabricWarehouse','Update-FabricWarehouse','Add-FabricWorkspaceCapacity','Add-FabricWorkspaceIdentity','Add-FabricWorkspaceRoleAssignment','Get-FabricWorkspace','Get-FabricWorkspaceRoleAssignment','Get-FabricWorkspaceUsageMetricsData','Get-FabricWorkspaceUser','New-FabricWorkspace','New-FabricWorkspaceUsageMetricsReport','Remove-FabricWorkspace','Remove-FabricWorkspaceCapacity','Remove-FabricWorkspaceIdentity','Remove-FabricWorkspaceRoleAssignment','Update-FabricWorkspace','Update-FabricWorkspaceRoleAssignment','Connect-FabricAccount','Get-FabricAPIClusterURI','Get-FabricAuthToken','Get-FabricConnection','Get-FabricDebugInfo','Get-FabricUsageMetricsQuery','Invoke-FabricRestMethod','New-FabricConnection','Remove-FabricConnection','Update-FabricConnection')

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = @('Assign-FabricDomainWorkspaceByCapacity','Assign-FabricDomainWorkspaceById','Assign-FabricDomainWorkspaceByPrincipal','Assign-FabricDomainWorkspaceRoleAssignment','Unassign-FabricDomainWorkspace','Unassign-FabricDomainWorkspaceRoleAssignment','Upload-FabricEnvironmentStagingLibrary','Import-FabricLakehouseTableData','Get-FabricActivator','Get-FabricActivatorDefinition','New-FabricActivator','Remove-FabricActivator','Update-FabricActivator','Update-FabricActivatorDefinition','Assign-FabricWorkspaceCapacity','Unassign-FabricWorkspaceCapacity')

# DSC resources to export from this module
DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

    PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        # Tags = @()

        # A URL to the license for this module.
        # LicenseUri = ''

        # A URL to the main website for this project.
        # ProjectUri = ''

        # A URL to an icon representing this module.
        # IconUri = ''

        # ReleaseNotes of this module
        ReleaseNotes = '## [0.34.0-main0001] - 2026-11-10

### Added

### Changed

### Fixed

### Deprecated

### Removed

### Security

## 0.34.0 - 2026-11-10

### Added

- Added connection management cmdlets, pipeline execution and job-instance lookup, and item schedule cmdlets for Cron, Daily, and Weekly configurations.
- Added consistent parameter aliases for the resource a cmdlet acts on (#83): `<Noun>Id` parameters accept `-Id` and `<Noun>Name` parameters accept `-Name` and `-DisplayName` (e.g. `Get-FabricLakehouse -WorkspaceId $ws -Name ''Sales''`). Existing parameter names are unchanged. Parent-resource parameters such as `-WorkspaceId` on item cmdlets are not aliased. Note: abbreviated parameter names that become ambiguous (e.g. `-I`, `-N`) must be spelled out further.
- Added a QA test (tag `ParameterAliases`) enforcing the resource parameter alias convention for all exported cmdlets.
- Added the Cmdlet Maturity Model (#183): every public cmdlet gets a level from 0 (Experimental) to 5 (Production Ready). The levels and criteria are documented in `docs/maturity-model.md`, and the current level of each cmdlet is listed in `docs/MATURITY.md`. Levels 1-4 are computed from the source (help, coding conventions, unit and integration tests); Experimental, Production Ready sign-off and check exemptions are recorded in `.build/Maturity.psd1`. Regenerate the report with `./build.ps1 -Tasks generate_maturity_report`.

### Changed

- `Invoke-FabricKQLCommand` aligned with the module''s patterns (#163): uses `Invoke-FabricRestMethod` for a single API call, requires either `-KQLDatabaseName` or `-KQLDatabaseId` (mutually exclusive parameter sets), and logs via `Write-Message`. The `-ReturnRawResult` switch is renamed to `-Raw`; `-ReturnRawResult` still works as an alias.
- Added `-ApiType` (`Fabric` (default), `PowerBI`, `Kusto`, `Azure`) to `Invoke-FabricRestMethod`, which selects the base URL and access token of the target API from configuration (#163). The Kusto token is acquired on first use and cached in the new `FabricTools.KustoSession.*` configuration; `Connect-FabricAccount` clears it on sign-in. The configuration key `FabricTools.KustoApi.BaseUrl` is renamed to `FabricTools.KustoApi.ResourceUrl`.
- The `-PowerBIApi` switch of `Invoke-FabricRestMethod` is now hidden and maps to `-ApiType PowerBI`; it is kept for backward compatibility. Module cmdlets use `-ApiType PowerBI`.

### Fixed

- Fixed `Invoke-FabricKQLCommand` failing with "Invalid URI: The hostname could not be parsed" (#163): the query service URI is now read from the KQL Database `properties`, and requests are authenticated with a Kusto API token (`-ApiType Kusto`) instead of an undefined header variable. Query results with zero rows no longer fail.
- Fixed `Get-FabricCapacity`, `Get-FabricDataPipeline`, `Get-FabricWorkspaceUser`, `Get-FabricCapacityRefreshables`, `Get-FabricCapacityWorkload`, `Get-FabricConnection`, `Get-FabricItem` and `Export-FabricItem` returning no items (#226): they read `.value` from output that `Invoke-FabricRestMethod` had already unwrapped. They now use `ExtractValue = ''True''`. `Get-FabricItem -itemID` and `Get-FabricConnection -connectionId` now return the requested object (previously nothing).
- Fixed `Invoke-FabricRestMethod` looping forever on paginated list responses (#228): the continuation token was never sent, so the first page was requested again and again. The token is now appended to the request, with `&` when the `Uri` already has a query string. Affects every list cmdlet whose results span more than one page.

### Deprecated

### Removed

- Removed the unused `MicrosoftPowerBIMgmt.Profile` dependency (#224). No FabricTools cmdlet uses it: authentication relies on Az.Accounts, and Power BI REST calls go through `Invoke-FabricRestMethod -ApiType PowerBI`. **Possible breaking change:** importing FabricTools no longer loads `MicrosoftPowerBIMgmt.Profile`, so scripts that used its cmdlets (e.g. `Connect-PowerBIServiceAccount`, `Invoke-PowerBIRestMethod`) without importing it must now run `Import-Module MicrosoftPowerBIMgmt.Profile` themselves. `Install-Module FabricTools` no longer installs it.
- Removed outdated wording about "Fabric-friendly aliases for PowerBI functions" from the module description and README; those aliases were already removed (#47).

### Security

## 0.33.0 - 2026-11-08

### Added

- Added Git integration cmdlets (#48): `Connect-FabricGit` (with `-Initialize` to connect and initialize in one call), `Disconnect-FabricGit`, `Get-FabricGitConnection`, `Initialize-FabricGitConnection`, `Get-FabricGitStatus` (with `-ChangesOnly` / `-ConflictsOnly`), `Invoke-FabricGitCommit` (all or selected items, accepts pipeline input from `Get-FabricGitStatus`), `Invoke-FabricGitUpdate`, `Get-FabricGitCredential` and `Update-FabricGitCredential`. Commit and update look up the workspace head and remote commit hash automatically unless `-NoAutoResolve` is used.
- Added Activator aliases for all Reflex cmdlets.
- Added `Refresh-FabricSQLEndpoint` to refresh SQL analytics endpoint metadata.
- Added `-SQLDatabaseName` (alias `Name`) to `Remove-FabricSQLDatabase`, requiring a unique exact name match within the specified workspace before deletion (#210).
- Added `WorkspaceName` (alias `Name`) to `Remove-FabricWorkspace` to delete a workspace by its exact display name, refusing deletion when no workspace or multiple workspaces match (issue #157).
- Added `Start-FabricNotebook` to run a notebook by ID or unique workspace-scoped name, wait for its job status by default, or return promptly with `-NoWait`. Supports `-WhatIf`, Retry-After polling, and execution failure details (#194).
- Added `-UseDeviceAuthentication` switch to `Connect-FabricAccount` to force device code authentication instead of the interactive broker/browser flow
- Added a documentation website generated from `docs/en-US` (`site/Build-DocsSite.ps1`), with search by command name, item type and verb, and a page per command. It is deployed to GitHub Pages from `main` (#3).
- Help files in `docs/en-US` now carry an `itemType` frontmatter key (the `src/Public` folder of the cmdlet, or `Core`), written by the `generate_docs` and `Generate_help_from_built_module` build tasks.

### Changed

- `Remove-FabricWorkspace` reports the workspace name after successful deletion, resolving it from the ID when necessary (#50).
- `Get-FabricWorkspaceUser` now includes the workspace name and ID on each returned user.
- `Get-FabricDatasetRefreshHistory` supports workspace-wide mode when `-DatasetId` is omitted and `-WorkspaceId` is supplied.
- `Remove-FabricItem` confirms each item individually instead of once for the whole batch, so `-WhatIf` lists the items by name and ID and `-Confirm` prompts per item rather than authorising the entire batch with a single answer
- `Remove-FabricItem` reports item counts through `Write-Message` rather than `Write-Output`, so the count is no longer emitted into the pipeline as output

### Fixed

- Fixed long-running operation handling when response headers contain enumerable values, and surfaced `New-FabricSQLDatabase` failures as PowerShell errors (#209).
- `Connect-FabricAccount` now automatically falls back to device code authentication when interactive/broker (WAM) sign-in fails, e.g. in terminal hosts such as Warp on Windows where the account picker cannot render
- Fixed `Get-FabricWorkspace | Get-FabricKQLDatabase` by allowing `WorkspaceId` pipeline input and processing each workspace (issue #162).

### Deprecated

### Removed

- Removed `Get-FabricDatasetRefreshes`, `Get-FabricWorkspaceDatasetRefreshes`, and the alias `Get-FabWorkspaceDatasetRefreshes`. Use `Get-FabricDatasetRefreshHistory` instead.
- Removed stale help files for `Add-FabricWorkspaceCapacityAssignment` and `Remove-FabricWorkspaceCapacityAssignment`, which are not part of the module.

### Security

## 0.32.0 - 2026-05-06

### Added

- Added `Get-FabricDataset` cmdlet to retrieve Power BI datasets from My Workspace or a specific workspace, with optional filtering by `DatasetId` or `DatasetName` (`WorkspaceId` parameter, alias `GroupId`)
- Added `Get-FabricDatasetRefreshHistory` cmdlet to retrieve the refresh history of a Power BI dataset, with optional `WorkspaceId` (alias `GroupId`) and `Top` parameters
- Added `Invoke-FabricDatasetRefresh` cmdlet (in `Dataset` folder) to trigger on-demand dataset refreshes, supporting both standard and enhanced refresh parameters (`Type`, `CommitMode`, `MaxParallelism`, `RetryCount`, `Timeout`, `EffectiveDate`, `ApplyRefreshPolicy`, `Objects`)
- Updated unit tests for `Invoke-FabricDatasetRefresh` to cover the new parameter set, alias, ShouldProcess, body construction, and error handling

### Changed

- Renamed `Add-FabricWorkspaceCapacityAssignment` to `Add-FabricWorkspaceCapacity` (issue #42)
- Renamed `Remove-FabricWorkspaceCapacityAssignment` to `Remove-FabricWorkspaceCapacity` (issue #42)
- Refactored `Invoke-FabricRestMethod` call in bunch of cmdlets to use hash splatting instead of backtick line continuation (issue #87)
- Refactored cmdlets to use `HandleResponse = $true` on `Invoke-FabricRestMethod`, removing manual status-code switches, LRO polling, and pagination loops from each cmdlet
- `Invoke-FabricRestMethod` handles response by default

### Fixed

- `Connect-FabricAccount` now automatically re-authenticates when MFA or conditional access has expired, without requiring the `-Reset` switch
- Made `ReportPathDefinition` parameter optional in `New-FabricReport` (issue #43)
- Fixed PowerShell 5.1 compatibility by replacing ternary operators with if-else statements (issue #166)
- Added PSFramework as a required module dependency to prevent "not recognized" errors on fresh environments (issue #167)
- Added `Id` parameter alias to Workspace functions that take `WorkspaceId` to support compatibility with API field names and issue #158.
- The module is compatible with PS 5.1 (issue #166)

### Deprecated

### Removed

- Removed `Invoke-FabricAPIReque'


        # Prerelease string of this module
        Prerelease =  'main0001'

        # Flag to indicate whether the module requires explicit user acceptance for install/update/save
        # RequireLicenseAcceptance = $false

        # External dependent modules of this module
        # ExternalModuleDependencies = @()

    } # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
HelpInfoURI = 'https://www.github.com/dataplat/FabricTools'

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}