Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start a comment-based help block in PowerShell.
PowerShell
<#[1] This function says hello. #>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using .DESCRIPTION or .PARAMETER as the first line inside the help block.
Not starting the help block with <#.
✗ Incorrect
The comment-based help block starts with <# and the first keyword is usually .SYNOPSIS to describe the function briefly.
2fill in blank
mediumComplete the code to add a parameter description in comment-based help.
PowerShell
<# .PARAMETER Name [1] the name to greet. #>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using another help keyword instead of a description.
Leaving the description incomplete.
✗ Incorrect
The .PARAMETER keyword is followed by the parameter name and then a description starting with a verb like 'Specifies'.
3fill in blank
hardFix the error in the comment-based help block to properly close it.
PowerShell
<# .SYNOPSIS Says hello [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using <# again instead of closing.
Using HTML style --> which is invalid in PowerShell.
✗ Incorrect
The comment-based help block must be closed with #> to end the multi-line comment.
4fill in blank
hardFill both blanks to add an example section with a description in comment-based help.
PowerShell
<# .EXAMPLE [1] [2] #>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting description before the example command.
Using unrelated commands in the example.
✗ Incorrect
The .EXAMPLE section includes the example command and a description explaining what it does.
5fill in blank
hardFill all three blanks to create a full comment-based help block with synopsis, parameter, and example.
PowerShell
<# .SYNOPSIS [1] .PARAMETER Name [2] .EXAMPLE [3] #>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the order of sections.
Leaving out the example or parameter description.
✗ Incorrect
A complete comment-based help block includes a synopsis, parameter description, and example command.