Bird
0
0

What will be the output of this PowerShell command?

medium📝 Command Output Q13 of 15
PowerShell - System Administration
What will be the output of this PowerShell command?
Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer' -Name 'ShellState'
ACreates a new registry key named 'ShellState'
BDisplays the value of 'ShellState' property from the specified registry key
CDeletes the 'ShellState' value from the registry key
DThrows an error because 'ShellState' is not a valid cmdlet
Step-by-Step Solution
Solution:
  1. Step 1: Understand Get-ItemProperty behavior

    This cmdlet reads the value of a property from a registry key.
  2. Step 2: Analyze the command

    The command reads the 'ShellState' value from the given registry path and outputs it.
  3. Final Answer:

    Displays the value of 'ShellState' property from the specified registry key -> Option B
  4. Quick Check:

    Get-ItemProperty reads registry values [OK]
Quick Trick: Get-ItemProperty outputs registry value data [OK]
Common Mistakes:
  • Thinking it creates or deletes keys
  • Confusing property name with cmdlet name
  • Expecting an error for valid property

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes