-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in
Get-Foocmdlet" instead of "Typo." - Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
Links
-
https://learn.microsoft.com/powershell/scripting/learn/ps101/06-flow-control#review
-
Previous related closed issue for additional context:
Add the answers to the "review" section #7728
Summary
The PS101 tutorial chapters include a Review section at the end of each chapter, but these sections provide only questions with no answers. This makes it difficult for learners to validate their understanding of the material. A similar suggestion was raised in Issue #7728 (2021), but the issue was closed without implementing any changes. I am proposing updates to add collapsible answer sections under each Review question.
Details
I reviewed the prior related Issue #7728 from 2021, but since it was closed without changes and platform capabilities and documentation patterns have evolved since then, I am submitting a new proposal with a fully implemented and modern solution.
Suggested Fix
Implement collapsible <details> answer sections under each Review question using the following DocFX-safe pattern:
-
Question text here
Answer
(Inline answer text here)
Each <details> block is indented 4 spaces so it remains visually grouped beneath the question without affecting surrounding content. Answers use inline backticks rather than fenced code blocks to ensure stable rendering on Microsoft Learn.
Example from Chapter 01:
-
How do you determine what PowerShell version a computer is running?
Answer
Use: `$PSVersionTable.PSVersion`
This approach acknowledges and respects the team’s previous decision (Issue #7728, 2021) to preserve the original formatting of the PowerShell 101 material as much as possible. The proposed change does not alter the narrative content and keeps the Review section visually identical unless the user chooses to expand an answer. The only visible addition is a small “Answer” dropdown neatly aligned beneath each question.
This makes the Review sections far more helpful for learners. For simple questions this may not matter much, but for ambiguous or multi‑path questions, having a way to verify correctness is extremely valuable and reinforces learning.
Additionally, I recommend updating each Review section to use proper sequential numbering (1, 2, 3, …) instead of repeating “1.” for every entry. This is a minor clarity improvement and aligns with conventional formatting expectations.
I have already completed the updated Review sections for all chapters within my local branch. If approved, I can submit the PR containing these changes, or split them by chapter depending on the maintainers’ preference.