Bird
0
0

What will be the output of this command in PowerShell 7+?

medium📝 Command Output Q4 of 15
PowerShell - Basics and Environment
What will be the output of this command in PowerShell 7+?
Write-Output $PSVersionTable.PSEdition
ALegacy
BDesktop
CWindows
DCore
Step-by-Step Solution
Solution:
  1. Step 1: Understand PSEdition property meaning

    PSEdition shows the edition of PowerShell: 'Core' for PowerShell 7+ and 'Desktop' for 5.1.
  2. Step 2: Identify edition for PowerShell 7+

    PowerShell 7+ is called 'Core' edition because it is cross-platform and based on .NET Core.
  3. Final Answer:

    Core -> Option D
  4. Quick Check:

    PSEdition in 7+ = Core [OK]
Quick Trick: PSEdition is 'Core' in PowerShell 7+, 'Desktop' in 5.1 [OK]
Common Mistakes:
  • Expecting 'Desktop' in 7+
  • Confusing edition names
  • Assuming 'Windows' or 'Legacy' are valid outputs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes