Skip to content

Lab 15: Clean up and next steps

Time
About 10 minutes
Level
intro
Platforms
Windows 11, macOS (file mode, no Desktop)
Copilot surfaces
VS Code, Power BI Desktop, github.com
You'll use
hook, cli, apm
Starts from
lab09-complete: Adds AI metadata: Q&A on, default labels, and the fabric/ai-prep drafts.
Ends at
lab09-complete: Adds AI metadata: Q&A on, default labels, and the fabric/ai-prep drafts.
Last verified
Not yet run end to end on Windows 11

Works on macOS

Nobody has run this lab end to end on Windows 11 yet. The steps follow the current docs for each tool, but menu labels may differ. The verify command at the end is the source of truth, and feedback is welcome.

The labs create local files, local tool installs, browser progress, branches, issues, and pull requests. They do not create Fabric workspaces, cloud resources, credentials, service principals, or secrets. Cleanup is mostly about deciding what to keep, because your repo copy and the agent customization files are useful after the lab.

The safest cleanup is report-first. Run the lab check, read what remains, then delete only the local outputs you don’t want.

  • Data junction: on Windows, C:\ContosoPharmacyDemo\data points to this repo’s data\generated folder so Power BI Desktop can refresh from a stable path.
  • Local outputs: ignored folders such as out/, .tools/, apm_modules/, and evaluation/runs/local-*.json. They are safe to inspect and delete manually.
  • Template copy: your GitHub repository created from the upstream template. Delete it only if you don’t want the lab history.
  • Progress state: the lab site stores checkboxes in browser local storage. Reset it on the /progress/ page.
  • Close Power BI Desktop. If Desktop is open, close it before removing the data junction.
  • Commit or discard any work you want to keep.
  • Decide whether your GitHub template copy is a keeper. It contains only synthetic data, but it may contain your lab branches and PRs.

Step 1. Close Desktop and inspect your repo

Section titled “Step 1. Close Desktop and inspect your repo”
Windows only
  1. Save anything you want in Power BI Desktop, then close Desktop.
  2. In VS Code, open Source Control: Ctrl+Shift+G, or View > Source Control.
  3. Check the changed files list.
  4. In the terminal, run:
Terminal window
git status --short

You should see: either a clean tree, or only files you recognize from the labs. Stop and commit or discard anything you care about before deleting local folders.

Windows only Optional

If you ran the Desktop labs on Windows, remove the junction that points C:\ContosoPharmacyDemo\data at this repo. The script removes the junction itself and never deletes data/generated/.

Terminal window
pwsh ./scripts/Set-LocalDataLink.ps1 -Remove

The script is Windows-only and exits without changes on macOS:

scripts/Set-LocalDataLink.ps1 (lines 32-53)
if (-not $IsWindows) {
Write-Host 'Set-LocalDataLink.ps1 is for Windows, where Power BI Desktop runs. Nothing to do on this OS.' -ForegroundColor Yellow
exit 0
}
$target = Join-Path (Get-RepoRoot) 'data' 'generated'
$item = Get-Item -LiteralPath $Path -Force -ErrorAction SilentlyContinue
$isLink = $item -and ($item.Attributes -band [IO.FileAttributes]::ReparsePoint)
if ($Remove) {
if (-not $item) { Write-Host "$Path doesn't exist. Nothing to remove."; exit 0 }
if (-not $isLink) { Write-Host "$Path is a real folder, not a link. Leaving it alone." -ForegroundColor Yellow; exit 1 }
if ($PSCmdlet.ShouldProcess($Path, 'Remove junction')) {
# Deleting the junction itself never touches the files it points at.
[IO.Directory]::Delete($Path)
$parent = Split-Path -Parent $Path
if ((Test-Path -LiteralPath $parent) -and -not (Get-ChildItem -LiteralPath $parent -Force)) {
Remove-Item -LiteralPath $parent
}
Write-Host "Removed $Path"
}
exit 0

You should see: on Windows, Removed C:\ContosoPharmacyDemo\data, or a message that it doesn’t exist. On macOS, you should see that there is nothing to do on this OS.

Run the Lab 15 check. It reports local output folders and local run files, but deletes nothing.

Terminal window
pwsh ./scripts/lab/Test-LabProgress.ps1 -Lab 15

The check can list:

  • out/, including assessment, comparison, hook logs, and DAX test output.
  • .tools/, if you downloaded local helper packages such as ADOMD.NET.
  • apm_modules/, if APM resolved package content locally.
  • evaluation/runs/local-*.json, if you ran the question tests.

You should see: a PASS if nothing is left, or a WARN-like optional failure listing local paths that remain. The check is informational. Delete those paths yourself only if you don’t need them.

Step 4. Decide what optional tools to keep

Section titled “Step 4. Decide what optional tools to keep”

The workstation setup may have installed optional tools you use elsewhere. Remove only what you installed just for the lab and no longer need.

ToolKeep ifRemove idea
GitHub Copilot CLIYou want terminal agent sessions.Use the package manager you used to install it.
APM CLIYou want repeatable agent packages.On Windows, remove Microsoft.APM with winget if you installed it that way. On macOS, brew uninstall apm if you used Homebrew.
VS Code extensionsYou use PowerShell, Python, TMDL, or Power BI Modeling MCP elsewhere.Open Extensions: Ctrl+Shift+X (macOS: Cmd+Shift+X), or View > Extensions, then uninstall only lab-specific extensions.
Python .venvYou want to run validation later.Delete .venv manually if you are done with local checks.
Node packages under site/node_modulesYou want to preview the site.Delete site/node_modules manually if you need space.

You should see: no automatic changes. This is a decision step.

The lab site stores progress in your browser, not in the repo.

  1. Open the lab site.
  2. Go to /progress/.
  3. Select Reset progress.
  4. Confirm the reset.

You should see: all lab checkboxes clear in this browser. Your repository files and GitHub issues are unchanged.

Step 6. Optionally delete your GitHub template copy

Section titled “Step 6. Optionally delete your GitHub template copy”
Optional

If you don’t need your lab repository anymore, delete it from GitHub. This is permanent for that repo copy.

  1. Open your repository on GitHub.com.
  2. Go to Settings > General.
  3. Scroll to Danger Zone.
  4. Select Delete this repository and follow GitHub’s confirmation prompts.

Nothing in this lab created cloud resources, credentials, service principals, Fabric workspaces, or tenant settings. There is nothing to revoke for the lab itself. If you added your own secrets or integrations while experimenting, remove those separately in Settings > Secrets and variables and in the external system.

You should see: either your repo remains because you kept it, or GitHub confirms it was deleted.

Open Roadmap and decide what phase two work matters to you. The roadmap separates what this lab covers from what belongs in a real BI program, such as Fabric workspaces, deployment, governance, monitoring, and product-specific Copilot experiences.

You should see: a clear list of items that are not in this lab and a shortlist of lab-site improvements.

Run this from the repo root in a PowerShell 7 terminal (Terminal > New Terminal in VS Code):

Terminal window
pwsh ./scripts/lab/Test-LabProgress.ps1 -Lab 15

When everything is done you should see:

Expected output
PASS L15-data-link-removed The data junction is removed
PASS L15-local-outputs Reports local outputs that remain (out/, .tools/, local runs). Deletes nothing.
Lab 15: 2 of 2 checks passed.

Each FAIL line prints a hint and a link back to the step on this page that fixes it. The command exits with code 0 when every required check passes.

CheckWhat it looks atIf it fails
L15-data-link-removed (optional) (Windows only)The data junction is removedRun pwsh ./scripts/Set-LocalDataLink.ps1 -Remove Go to step 2
L15-local-outputs (optional)Reports local outputs that remain (out/, .tools/, local runs). Deletes nothing.Delete the listed folders yourself if you don't need them. Go to step 3

Optional checks can FAIL without failing the lab.

Set-LocalDataLink.ps1 says the path is a real folder

The script refuses to delete real data. Open C:\ContosoPharmacyDemo\data, move or delete the files yourself if you own them, then rerun the script. If you’re not sure, leave the folder alone.

The Lab 15 check reports out/ or local runs

That’s expected. The check reports local outputs and deletes nothing. Keep them if you want evidence from the labs, or delete them manually when you’re done.

I deleted the GitHub repo but still have a local clone

The local clone remains on disk. Delete the local folder manually only after you have saved anything you want. If you keep the clone, remove or change the origin remote because it points to a deleted repo.

I want to start the labs over

Create a fresh branch and restore a checkpoint, for example pwsh ./scripts/lab/Restore-LabCheckpoint.ps1 -Checkpoint lab02-start. The restore script needs the upstream remote from Lab 01 step 3.

What does Set-LocalDataLink.ps1 -Remove delete?

Show the answer

The junction at C:\ContosoPharmacyDemo\data, not the repo data files.

The script removes the Windows junction and its empty parent folder when possible. It does not delete data/generated.

What cloud resources does this lab create?

Show the answer

None. The lab uses local files and GitHub repo features.

The lab does not create Fabric workspaces, credentials, service principals, or Azure resources.

Why does Lab 15 report local outputs instead of deleting them?

Show the answer

Some outputs are useful evidence, so you choose what to keep.

Files under out, local runs, and tool caches can help with demos or later review. The lab leaves deletion to you.

You removed the optional Windows data junction, reviewed local outputs, decided what optional tools and repo copies to keep, and reset site progress if you wanted a fresh browser state. The lab did not create cloud infrastructure or credentials, so cleanup stays local and GitHub-focused.

That's the last lab. See the roadmap for what comes next.