Bird
0
0

What will this command output?

medium📝 Command Output Q5 of 15
PowerShell - Modules and Script Organization
What will this command output?
Find-Module -Name PSReadLine | Select-Object -Property Name, Version
AInstalls the PSReadLine module and shows its version
BDisplays the name and version of the PSReadLine module available in the gallery
CLists all installed modules with their names and versions
DThrows an error because Select-Object cannot be piped
Step-by-Step Solution
Solution:
  1. Step 1: Understand Find-Module output

    Find-Module returns module info from the gallery, including name and version.
  2. Step 2: Understand Select-Object usage

    Select-Object filters output properties to Name and Version.
  3. Final Answer:

    Displays the name and version of the PSReadLine module available in the gallery -> Option B
  4. Quick Check:

    Find-Module + Select-Object = filtered gallery info [OK]
Quick Trick: Pipe Find-Module to Select-Object to show specific properties [OK]
Common Mistakes:
  • Confusing Find-Module with Install-Module
  • Thinking it lists installed modules
  • Believing Select-Object cannot be piped

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes