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-Service -Name W32Time | Select-Object -Property Status
AStarts the W32Time service.
BDisplays the status (Running or Stopped) of the W32Time service.
CStops the W32Time service.
DShows an error because Select-Object cannot be used here.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Get-Service with Select-Object

    Get-Service -Name W32Time fetches the service object, and piping it to Select-Object -Property Status extracts only the status property.
  2. Step 2: Determine the output

    The output will be a simple display showing the status of the W32Time service, such as Running or Stopped.
  3. Final Answer:

    Displays the status (Running or Stopped) of the W32Time service. -> Option B
  4. Quick Check:

    Get-Service + Select-Object = Show service status [OK]
Quick Trick: Get-Service piped to Select-Object shows specific properties [OK]
Common Mistakes:
  • Thinking it starts or stops the service
  • Believing Select-Object causes an error here
  • Confusing service name with command parameters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes