220-1102 Question 263
Single answerpsA Windows 11 technician is troubleshooting a PC that becomes slow shortly after sign-in. The technician wants to use PowerShell to identify which running process is consuming the most CPU at that moment. Which command should the technician use?
- A
Get-Process | Sort-Object CPU -Descending | Select-Object -First 1
- B
Get-Service | Sort-Object CPU -Descending | Select-Object -First 1
- C
Get-EventLog System | Sort-Object CPU -Descending | Select-Object -First 1
- D
ipconfig /all | findstr CPU
Show answer and explanation
Correct answer: A
Explanation
In PowerShell, Get-Process is the standard cmdlet for viewing running processes and properties such as CPU, Handles, WorkingSet, and process name. For A+ Core 2 troubleshooting, a technician should know how to use command-line and scripting tools to diagnose common performance issues. Sorting by CPU in descending order and selecting the first result is an efficient way to identify the most CPU-intensive process from the current list. Microsoft documents Get-Process as the cmdlet for managing and viewing local or remote processes, while cmdlets like Get-Service and Get-EventLog serve different administrative purposes. Note that the CPU value shown by Get-Process represents total processor time consumed by the process, which is still useful for identifying heavy resource usage during troubleshooting.
- A. Correct.
Correct. Get-Process retrieves running processes, and the CPU property can be sorted in descending order to show the process that has used the most processor time. Piping the result to Select-Object -First 1 returns the top entry, which is a practical way to identify a likely culprit during performance troubleshooting.
- B. Incorrect.
Incorrect. Get-Service lists Windows services, not process CPU consumption in a way intended for this type of troubleshooting. Although some services are associated with processes, this cmdlet does not provide the same direct per-process CPU usage view needed here.
- C. Incorrect.
Incorrect. Get-EventLog System reads entries from the System event log. Event log objects do not have a CPU metric that can be meaningfully sorted to find a high-CPU process. A technician might choose this if confusing troubleshooting logs with live performance data.
- D. Incorrect.
Incorrect. ipconfig /all displays network adapter and TCP/IP configuration details. It has nothing to do with CPU utilization or process analysis. This distractor reflects confusion between general command-line tools and performance-monitoring commands.