Nonprofits

Nonprofit Data Solutions - Installation Scripts

This directory contains PowerShell scripts to automate setup, update, and cleanup tasks for a Microsoft Fabric workspace.

Prerequisites

  1. Install Python 3.x (required for some notebook and data operations)
  2. Install Microsoft Fabric CLI (fab)
  3. Run fab auth login to authenticate with your Fabric environment

Main scripts

Create-Workspace.ps1

Creates a new Fabric workspace with the specified name.

.\Create-Workspace.ps1 -WorkspaceName "MyWorkspace"

Install-IntoWorkspace.ps1

Deploys all workspace assets (lakehouses, notebooks, pipelines, triggers, reports, semantic models) into a Fabric workspace. Handles notebook parameterization and asset metadata setup. Sample data is imported by default.

Full Installation with Sample Data (default):

.\Install-IntoWorkspace.ps1 -WorkspaceName "MyWorkspace" -Prefix "NDS_"

Installation without Sample Data:

.\Install-IntoWorkspace.ps1 -WorkspaceName "MyWorkspace" -Prefix "NDS_" -SkipSampleData

Skip Confirmation Prompts (for automated deployments):

.\Install-IntoWorkspace.ps1 -WorkspaceName "MyWorkspace" -Prefix "NDS_" -SkipConfirmation

Parameters:

Data source options

The installation supports three data sources. The deployment detects an existing connection automatically, or falls back to sample data.

Clean-Workspace.ps1

Removes all deployable assets from the specified Fabric workspace, including notebooks, lakehouses, pipelines, triggers, reports, and semantic models.

.\Clean-Workspace.ps1 -WorkspaceName "MyWorkspace"

Remove-Workspace.ps1

Removes the entire Fabric workspace and all its contents.

.\Remove-Workspace.ps1 -WorkspaceName "MyWorkspace"

Contributor helper scripts

List-NdsWorkspaceItems.ps1

Lists all items of a given type (e.g., Notebook, Lakehouse, DataPipeline) in a workspace, excluding temporary items.

.\List-NdsWorkspaceItems.ps1 -WorkspaceName "MyWorkspace" -ItemType "Notebook"

Download-LakehouseData.ps1

Downloads all files from a specified Fabric Lakehouse path to a local directory. Mind the quotation marks, they are important…

.\Download-LakehouseData.ps1 -FabricPath "MyWorkspace.Workspace/NDS_Silver.Lakehouse/Files/nds-silver-sampledata" -LocalPath "./Data/nds-silver-sampledata/"

Export-Items.ps1

Export existing items from Fabric workspace to the local repository. Add ` -Verbose` parameter for verbose logs.

Export all items:

.\Export-Items.ps1 -WorkspaceName "MyWorkspace"

Export all items from specific workspace:

.\Export-Items.ps1 -WorkspaceName "MyWorkspace"

Export a single item:

.\Export-Items.ps1 -WorkspaceName "MyWorkspace" -ItemName "NDS_Config.Notebook"

Export raw workspace items without repository-specific renaming or dynamic variable processing:

.\Export-RawItems.ps1 -WorkspaceName "MyWorkspace" -TargetDirectory "./Export"

Export raw items by prefix or a single item:

.\Export-RawItems.ps1 -WorkspaceName "MyWorkspace" -ItemsPrefix "NDS_"
.\Export-RawItems.ps1 -WorkspaceName "MyWorkspace" -ItemName "NDS_Config.Notebook"