nerdexam
CompTIA

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.

Server administration

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)
  • A
    86% (24)
  • B
    4% (1)
  • E
    7% (2)
  • F
    4% (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.

Aget-servicesCorrect

The PowerShell Get-Service cmdlet (written as 'get-services' in the question) lists all installed Windows services along with their current running status.

Bshow ports

'show ports' is not a valid Windows command - it is Cisco IOS CLI syntax used on network devices, not Windows shells.

Csc queryCorrect

The sc query command interfaces with the Windows Service Control Manager to report the current state of installed services on the local system.

DnetstatCorrect

netstat displays active TCP and UDP connections, listening ports, and associated process identifiers, directly revealing what network ports are open on the server.

Evmstat

vmstat is a Linux and Unix utility that reports virtual memory and CPU statistics and is not a native Windows command-line tool.

Fshow services

'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

#netstat#sc query#Windows command line#port monitoring

Community Discussion

No community discussion yet for this question.

Full SK0-004 Practice