SK0-004 · Question #100
An administrator would like to determine what port and services are running locally on a server. Which of the following Windows command lines and shell tools should the administrator use? (Select…
The correct answer is A. get-services C. sc query D. netstat. On Windows, sc query, netstat, and the PowerShell Get-Service cmdlet together cover both service enumeration and open port discovery on a local server.
Question
An administrator would like to determine what port and services are running locally on a server. Which of the following Windows command lines and shell tools should the administrator use? (Select THREE).
Options
- Aget-services
- Bshow ports
- Csc query
- Dnetstat
- Evmstat
- Fshow services
How the community answered
(28 responses)- A86% (24)
- B4% (1)
- E7% (2)
- F4% (1)
Why each option
On Windows, sc query, netstat, and the PowerShell Get-Service cmdlet together cover both service enumeration and open port discovery on a local server.
The PowerShell Get-Service cmdlet (written as 'get-services' in the question) lists all installed Windows services along with their current running status.
'show ports' is not a valid Windows command - it is Cisco IOS CLI syntax used on network devices, not Windows shells.
The sc query command interfaces with the Windows Service Control Manager to report the current state of installed services on the local system.
netstat displays active TCP and UDP connections, listening ports, and associated process identifiers, directly revealing what network ports are open on the server.
vmstat is a Linux and Unix utility that reports virtual memory and CPU statistics and is not a native Windows command-line tool.
'show services' is not a valid Windows command - like 'show ports', it follows Cisco IOS CLI conventions rather than Windows syntax.
Concept tested: Windows tools for local port and service enumeration
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/netstat
Topics
Community Discussion
No community discussion yet for this question.