GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tutorials/src/lessons at main · SitecorePowerShell/tutorials

Expand file tree

/

lessons

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

lessons

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
__tests__
__tests__
 
 
00-builder-intro.yaml
00-builder-intro.yaml
 
 
01-welcome.yaml
01-welcome.yaml
 
 
02-navigating.yaml
02-navigating.yaml
 
 
03-pipeline.yaml
03-pipeline.yaml
 
 
04-filtering.yaml
04-filtering.yaml
 
 
05-provider-paths.yaml
05-provider-paths.yaml
 
 
06-ise-intro.yaml
06-ise-intro.yaml
 
 
07-variables.yaml
07-variables.yaml
 
 
08-foreach.yaml
08-foreach.yaml
 
 
09-content-reports.yaml
09-content-reports.yaml
 
 
10-creating-items.yaml
10-creating-items.yaml
 
 
11-moving-copying.yaml
11-moving-copying.yaml
 
 
12-compound-filters.yaml
12-compound-filters.yaml
 
 
13-numeric-select.yaml
13-numeric-select.yaml
 
 
14-string-operations.yaml
14-string-operations.yaml
 
 
15-dotnet-types.yaml
15-dotnet-types.yaml
 
 
16-data-export.yaml
16-data-export.yaml
 
 
17-conditionals.yaml
17-conditionals.yaml
 
 
18-bulk-updates.yaml
18-bulk-updates.yaml
 
 
19-find-item-intro.yaml
19-find-item-intro.yaml
 
 
20-find-item-filters.yaml
20-find-item-filters.yaml
 
 
21-find-item-advanced.yaml
21-find-item-advanced.yaml
 
 
22-find-vs-get.yaml
22-find-vs-get.yaml
 
 
23-playground.yaml
23-playground.yaml
 
 
24-template-introspection.yaml
24-template-introspection.yaml
 
 
25-field-deep-dive.yaml
25-field-deep-dive.yaml
 
 
26-error-handling.yaml
26-error-handling.yaml
 
 
27-publishing.yaml
27-publishing.yaml
 
 
28-real-world-scenarios.yaml
28-real-world-scenarios.yaml
 
 
29-dialog-builder.yaml
29-dialog-builder.yaml
 
 
30-search-builder.yaml
30-search-builder.yaml
 
 
31-security.yaml
31-security.yaml
 
 
32-bulk-csv-import.yaml
32-bulk-csv-import.yaml
 
 
README.md
README.md
 
 
loader.ts
loader.ts
 
 

README.md

Outline

Lesson Authoring Guide

This guide covers how to create and validate lessons for the SPE interactive tutorial.

Task YAML Anatomy

Each lesson is a YAML file with metadata and a tasks array. Each task has:

- instruction: |          # What the user should do (markdown, required)
  hint: |                 # Full answer shown after 4 failed attempts (required)
  nudge: |                # Gentle hint shown after 2 failed attempts (optional)
  starterCode: |          # Pre-filled editor content for ise/builder mode (optional)
  validation:             # How completion is determined (required)
  successMessage: |       # Explanation shown on success (optional)
  builderConfig:          # Visual builder config, builder mode only (optional)

Three Validation Types

structural — No execution, checks command shape

Checks cmdlet name, resolved path (by node ID), and switches. Best for single-cmdlet tasks teaching navigation.

validation:
  type: structural
  cmdlet: get-item
  requirePath:
    - "master:\\content\\Home"
    - "master:/content/Home"
    - "master:\\Content\\Home"
  requireSwitches:
    - recurse
  requireParams:
    Name: "Contact Us"
    ItemType: "Sample/Sample Item"

Fields:

  • cmdlet (required) — lowercase cmdlet name (e.g. get-childitem)
  • requirePath (optional) — array of path variants; resolved to node IDs for comparison
  • requireSwitches (optional) — array of switch names without the dash prefix
  • requireParams (optional) — map of parameter name → expected value (case-insensitive key lookup, exact value match)

Path arrays should include multiple format variants (backslash, forward-slash, lowercase) since the validator resolves them to node IDs.

Error cascade: wrong cmdlet → invalid path → wrong path → missing switch → missing/wrong param

pipeline — Checks stages + optionally executes for output

Checks that required cmdlets appear anywhere in the pipeline (alias-aware), then optionally runs the script to verify output.

validation:
  type: pipeline
  stages:
    - get-childitem
    - where-object
    - select-object
  outputContains: "Sample Item"
  outputNotContains: "Folder"
# With parameter checking across multi-command scripts
validation:
  type: pipeline
  stages:
    - new-item
    - get-childitem
  requireParams:
    Name: "Contact Us"
    ItemType: "Sample/Sample Item"
  outputContains: "Contact Us"

Fields:

  • stages (required) — array of lowercase cmdlet names checked across ALL statements
  • requireParams (optional) — map of parameter name → expected value; matched against ANY stage across all statements (case-insensitive key lookup, exact value match)
  • outputContains (optional) — string that must appear in execution output
  • outputNotContains (optional) — string that must NOT appear in execution output

Aliases are accepted: gci matches get-childitem, ? matches where-object, etc.

Error cascade: missing stage → missing/wrong param → wrong output → filter too broad

output — Execute and check output only, no structural checks

Runs the script and checks output strings. Best for run-and-observe tasks where the starterCode is complete.

validation:
  type: output
  outputContains: "Report"
  outputNotContains: "Error"

Fields:

  • outputContains (optional) — string that must appear in execution output
  • outputNotContains (optional) — string that must NOT appear in execution output

Use for: Tasks with complete starterCode where the user runs pre-written code to observe behavior.

Error cascade: output mismatch

Three Editor Modes

Set via the lesson-level mode field:

  • repl (default) — Single-line console. No starterCode. User types commands from scratch.
  • ise — Multi-line editor. StarterCode can be partial (user completes it) or complete (user runs and observes).
  • builder — Visual drag-and-drop pipeline builder. Uses builderConfig for available cmdlets and locked prefilled stages.

Error Messages Generated by Validator

Scenario Message
Wrong cmdlet "Try using Get-Item for this task."
Invalid path "The path you specified doesn't resolve to a valid item. Check your path."
Wrong path "Your command resolved to the wrong item. Check your path."
Missing switch "Don't forget the -Recurse switch."
Missing param (structural) "Don't forget the -Name parameter."
Wrong param value (structural) "The -Name parameter value doesn't match what's expected."
Missing pipeline stage "Your script should include Where-Object."
Missing param (pipeline) "Your script should include -Name "Contact Us"."
Wrong output (pipeline) "Your script runs, but the output doesn't match what's expected. Check your filter criteria."
Filter too broad "Your filter isn't specific enough — unwanted items are getting through."
Wrong output (output) "Your script runs, but the output doesn't match what's expected. Check your code."

Hint Tier System

User Attempts UI Behavior
0–1 No hints available
2–3 "Show Hint" button → displays nudge (gentle guidance)
4+ "Show Answer" button → displays hint (full solution as code block)

Validation Design Principles

  1. Accept equivalent input — paths compared by node ID, cmdlets accept aliases, extra params ignored
  2. Progressive feedback — partial[] shows checkmarks for correct parts
  3. Guide without revealing — error messages point to the problem area, never show the answer
  4. Validate intent, not syntax — "did they use the right tool on the right target?"

Lesson Authoring Checklist

  • Every task has instruction, hint, and validation
  • Path arrays include multiple format variants (backslash, forward-slash, lowercase)
  • outputContains uses a string unique to the correct output
  • outputNotContains catches the most common wrong answer
  • successMessage explains the "why" or teaches a concept
  • ISE tasks have starterCode (partial for learning, complete for observation)
  • Builder tasks have builderConfig with availableCmdlets and any prefilled locked stages
  • nudge provides directional guidance without giving the answer
  • hint provides the complete working command/script
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.