| name | study-session |
| description | Start or stop a certification study session by invoking Invoke-AzStudySession.ps1. Parses natural language to extract parameters and prompts for any that are missing. Use when asked to begin/start/stop a study session, start studying, track study time, or log study activity. |
| user-invokable | true |
| argument-hint | [e.g. 'Begin AZ-305 study session, MSDocs'] |
Study Session
Invoke Invoke-AzStudySession.ps1 to start or stop a certification study session. Parse the user's natural language request to extract parameters and interactively prompt for any required values that are missing or ambiguous.
When to Use
- Starting a new study session (e.g., "Begin AZ-305 study session, MSDocs")
- Stopping the current study session (e.g., "Stop studying", "End study session")
- Any request involving study session tracking or logging study time
Script Location
.assets/scripts/Invoke-AzStudySession.ps1
The script must be invoked from the workspace root (c:\Users\gregt\LocalCode\Learning\LearningAzure).
Parameters
| Parameter | Type | Required | Default | Description |
|---|
Action | String | No | Start | Start or Stop |
Exam | String | Yes (Start); optional (Stop) | — | Exam code (e.g., AZ-305, AI-102) |
Mode | String | Yes (Start) | — | Study mode (see table below) |
Task | String | No | — | Task name from the exam's Skills.psd1 |
Notes | String | No | — | Free-text session notes |
Mode Values and Natural Language Aliases
| Mode | Aliases (case-insensitive) |
|---|
PracticeQuestion | practice question, practice, quiz, questions |
MSLearn | ms learn, mslearn, learning path, learn, module |
MSDocs | ms docs, msdocs, docs, documentation, deep research, deep dive |
Lab | lab, hands-on, hands on, hands on lab |
Action Aliases
| Action | Aliases (case-insensitive) |
|---|
Start | start, begin, open, new |
Stop | stop, end, finish, done, close, wrap up |
Procedure
Step 1 — Parse the User's Request
Extract as many parameters as possible from the natural language input:
- Action: Look for action keywords. Default to
Start if no action word is found but study context is clear.
- Exam: Look for exam codes like
AZ-305, AI-102, AZ-104, AI-103, AI-900.
- Mode: Match against the alias table above. Map to the canonical value.
- Task: If the user provides a task name or partial match, capture it. This will be validated in Step 2.
- Notes: Any remaining descriptive text that doesn't map to other parameters.
Step 2 — Prompt for Missing Required Parameters
For a Start action, both Exam and Mode are required. Task is optional.
If Exam is missing, use vscode_askQuestions to ask:
If Mode is missing, use vscode_askQuestions to ask:
- Present the four mode values as options:
PracticeQuestion, MSLearn, MSDocs, Lab.
Task is optional. Offer it when the user has not already specified one:
- Recommend from StudyLog — Read the exam's study log at
certs/<Exam>/StudyLog.md. Find the first data row (the most recent session) and extract the value from the Task column (or legacy Skill column if the header has not yet been renamed). This is the recommended task.
- Load all valid tasks — Read
certs/<Exam>/Skills.psd1 and parse task names from the Domains[].Skills[].Tasks hierarchy, deduplicated.
- Prompt with recommendation — Use
vscode_askQuestions to present the task list as options, including a "Skip" option so the session can be logged without a task. Mark the task from the latest StudyLog entry as recommended: true. If the StudyLog is empty or the file does not exist, do not mark any option as recommended.
For a Stop action, no additional parameters are strictly required (the script auto-detects the active session). If Exam is provided, pass it through. Optionally ask for Notes.
Ask all missing parameters in a single vscode_askQuestions call when possible.
Step 3 — Execute the Command
Build and run the PowerShell command:
& .assets/scripts/Invoke-AzStudySession.ps1 -Action <Action> -Exam <Exam> [-Mode <Mode>] [-Task '<Task>'] [-Notes '<Notes>']
- Quote the
-Task value (task names contain spaces).
- Quote the
-Notes value if provided.
- Run from the workspace root directory.
Step 4 — Report the Result
- If the command succeeds, confirm the action briefly (e.g., "Study session #12 started for AZ-305").
- If the command fails, show the error and suggest corrective action.
Examples
Example 1: Full input
"Begin AZ-305 study session, MSDocs, Design governance"
Parsed: Action=Start, Exam=AZ-305, Mode=MSDocs, Task=Design governance
& .assets/scripts/Invoke-AzStudySession.ps1 -Action Start -Exam AZ-305 -Mode MSDocs -Task 'Design governance'
Example 2: Partial input
"Start studying AZ-104"
Parsed: Action=Start, Exam=AZ-104, Mode=?, Task=?
→ Prompt for Mode and (optionally) Task using vscode_askQuestions. The Task picker reads the latest row from certs/AZ-104/StudyLog.md and marks that task as the recommended default. A "Skip" option allows starting without a task.
Example 3: Stop session
"End study session"
Parsed: Action=Stop
& .assets/scripts/Invoke-AzStudySession.ps1 -Action Stop