Bird
0
0

Given this comment-based help snippet inside a script:

medium📝 Command Output Q13 of 15
PowerShell - Functions
Given this comment-based help snippet inside a script:
<#
.SYNOPSIS
Shows a greeting message
.PARAMETER Name
The name to greet
#>
function Greet-User {
  param([string]$Name)
  "Hello, $Name!"
}
What will Get-Help Greet-User display under the SYNOPSIS section?
ANo help available
BThe name to greet
CHello, $Name!
DShows a greeting message
Step-by-Step Solution
Solution:
  1. Step 1: Identify the SYNOPSIS section content

    The SYNOPSIS section contains the short description: "Shows a greeting message".
  2. Step 2: Understand Get-Help output

    Get-Help shows the SYNOPSIS text exactly as written under that section.
  3. Final Answer:

    Shows a greeting message -> Option D
  4. Quick Check:

    SYNOPSIS text = Shows a greeting message [OK]
Quick Trick: SYNOPSIS shows short script description in Get-Help [OK]
Common Mistakes:
  • Confusing PARAMETER text with SYNOPSIS
  • Expecting function output as help text
  • Assuming no help shows by default

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes