Example usage for netstat.
netstat -anoDisplay network connections, listening ports and related statistics.
netstat [-a] [-b] [-e] [-n] [-o] [-p <Protocol>] [-q] [-r] [-s] [<interval>]The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.
Example usage for netstat.
netstat -ano| Option / clause | Description |
|---|---|
-a | Show all connections and listening ports. |
-n | Show addresses and ports numerically. |
-o | Show the owning process ID. |
-b | Show associated executables; may require elevation. |
-r, -s | Show routing information or per-protocol statistics. |
-e | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
-p | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
<Protocol> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
-q | Microsoft documents this switch; use the linked reference for accepted values, effects and version limits. |
<interval> | Microsoft documents this argument or subcommand; check the linked reference for its required format and context. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.