You are a first responder dispatched to a compromised Windows 10 workstation. The system is still powered on and the user is logged in. Before isolating the machine from the network, you need to capture the current state of active network connections and the processes that own them. Which command should you run first?
The -a switch lists all connections and listening ports, -n prevents DNS resolution so results are immediate and unaltered, -o shows the owning process ID, and -b displays the executable name. Running this before network isolation preserves ephemeral connections tied to malicious processes that would otherwise be lost or reset.
Why this answer
Capturing active network connections with their owning processes is a high-priority volatile data collection step. The netstat command with all, numeric, owner, and binary switches reveals listening ports, established sessions, and the executables behind them. Doing this before isolating the host preserves evidence that disappears the moment connections are reset or the interface is disabled.
Exam trap
The trap here is assuming that isolation must happen before any collection, when network state is among the most volatile evidence and must be captured while the host is still connected.