SK0-004 · Question #645
An administrator wants to use a PowerShell cmdlet to find the running services on a Windows server. Which of the following are PowerShell cmdlet commands that will accomplish this task? (Choose two.)
The correct answer is A. get-process B. get-service. PowerShell provides native cmdlets including Get-Service and Get-Process to enumerate service and process state on a Windows server without relying on legacy command-line tools.
Question
An administrator wants to use a PowerShell cmdlet to find the running services on a Windows server. Which of the following are PowerShell cmdlet commands that will accomplish this task? (Choose two.)
Options
- Aget-process
- Bget-service
- Cnetstat
- Dget-wmiobject 璫lass win32_service
- Eipconfig
How the community answered
(59 responses)- A92% (54)
- C2% (1)
- D2% (1)
- E5% (3)
Why each option
PowerShell provides native cmdlets including Get-Service and Get-Process to enumerate service and process state on a Windows server without relying on legacy command-line tools.
Get-Process retrieves all currently running processes on the system, which includes the host processes that back Windows services, providing visibility into what is actively executing on the server.
Get-Service is the primary PowerShell cmdlet for listing Windows services and their current status (Running, Stopped, or Paused), making it the most direct command for finding running services.
Netstat is a legacy command-line networking utility that displays active TCP/UDP connections and listening ports, not a PowerShell cmdlet and unrelated to listing services.
As displayed in the question, this choice contains a corrupted character in place of the '-c' flag, making it syntactically invalid as written; the intended 'Get-WmiObject -Class Win32_Service' would otherwise be valid but was not presented correctly.
Ipconfig is a command-line tool that displays network adapter IP configuration and is not a PowerShell cmdlet or a method for listing running services.
Concept tested: PowerShell cmdlets for enumerating Windows services
Source: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-service
Topics
Community Discussion
No community discussion yet for this question.