This guide covers the essential Windows commands for discovering and listing devices on your local network. Whether you’re a sysadmin troubleshooting connectivity, a homelab enthusiast mapping your gear, or just curious about what’s connected to your router, these built-in tools require no extra software. You’ll learn the exact syntax, what each command reveals, and how to interpret the output.
1. arp -a
The Address Resolution Protocol (ARP) table maps IP addresses to physical MAC addresses for every device your PC has recently communicated with. Running arp -a in Command Prompt displays this cached list, showing IP, MAC, and the interface (e.g., Ethernet or Wi-Fi). It’s the fastest way to see devices you’ve already interacted with, but it won’t show silent devices that haven’t sent traffic to your machine.
2. ping (Broadcast or Subnet)
Pinging the broadcast address (e.g., ping 192.168.1.255) or your subnet mask (e.g., ping 192.168.1.0) forces every active device to respond, populating the ARP cache. After the ping completes, run arp -a to see the full list. This is a two-step process but effective for discovering devices that haven’t talked to your PC yet. Note that many routers and firewalls block broadcast pings, so results may be incomplete.
3. net view
The net view command lists computers and devices that are sharing files or printers on the network, using the Server Message Block (SMB) protocol. Run net view without arguments to see all available shares from the current domain or workgroup. It’s useful for quickly finding Windows PCs and NAS devices, but it won’t show devices like smart TVs or IoT gadgets that don’t use SMB.
4. getmac /v
While getmac is primarily for your own machine’s MAC addresses, adding the /v switch shows the network adapter’s connection name and associated IP. This is helpful when you need to identify which physical NIC corresponds to which IP before scanning others. It’s not a network discovery tool per se, but it’s a good first step to confirm your own identity on the network.
5. ipconfig /all
This command displays detailed IP configuration for all adapters, including IP address, subnet mask, default gateway, and DNS servers. While it doesn’t list other devices, it tells you your subnet and gateway—essential info for crafting an effective ping sweep or knowing which IP range to scan. You’ll need this to understand the output of other tools.
6. tracert
Running tracert against a known IP (like your router or a server) traces the route packets take, revealing intermediate hops. On a local network, it can show the IPs of routers or switches in the path. It’s not a discovery tool, but it helps you identify network infrastructure devices and verify connectivity. For example, tracert 8.8.8.8 will show your gateway as the first hop.
7. for /L + ping (Ping Sweep)
This is a powerful one-liner that pings every IP in a range sequentially. In Command Prompt, type: for /L %i in (1,1,254) do ping -n 1 -w 100 192.168.1.%i (adjust subnet and range). It sends one ping to each address and waits 100ms. After it finishes, run arp -a to see which IPs responded. This is the most thorough built-in method for discovering active devices on your subnet.
8. nbtstat -a
NetBIOS over TCP/IP is still used on many Windows networks. nbtstat -a [IP] displays the NetBIOS name table for a specific IP address, revealing the device’s hostname and logged-in users. This is great for identifying unknown devices by name, but it only works if NetBIOS is enabled and the device responds to it. Combine it with a ping sweep to map IPs to names.
9. nslookup
While primarily a DNS lookup tool, nslookup can help identify devices that have DNS records. For example, nslookup 192.168.1.10 performs a reverse lookup and returns the hostname if a PTR record exists. This is useful on networks with a local DNS server (like Active Directory or a router with hostname resolution). It won’t work for devices without reverse DNS entries.
10. wmic (Deprecated but Still Works)
The wmic command can query network information from remote computers if you have admin credentials. For instance, wmic /node:192.168.1.10 nicconfig get IPAddress,MACAddress retrieves that machine’s IP and MAC. It’s powerful but requires WMI to be enabled and proper permissions. Note that wmic is deprecated in newer Windows versions, so it may not be available in future releases.
How to Choose
Selecting the right command depends on your goal. For a quick snapshot of devices you’ve already talked to, arp -a is the fastest. For a full discovery of all active devices, use a ping sweep (for /L) followed by arp -a. If you need to identify device names, combine nbtstat -a or nslookup with your IP list. For network shares, net view is your friend. Remember that no single command is perfect—most network admins use a combination of these to build a complete picture.
Frequently Asked Questions
Q: Why does arp -a show fewer devices than I expect?
A: The ARP cache only contains devices that have communicated with your PC. Devices that haven’t sent traffic to you won’t appear until you ping them or they broadcast.
Q: Can I see wireless devices like phones and smart TVs?
A: Yes, as long as they are on the same subnet and respond to ping or ARP. However, some devices may ignore pings or be on a separate VLAN, so they won’t show up.
Q: Do I need admin rights to run these commands?
A: Most of these commands work as a standard user. However, some options like wmic with remote nodes may require administrative privileges. Running Command Prompt as administrator is recommended for full functionality.
Q: How do I scan a different subnet?
A: Change the IP range in the ping sweep command. For example, if your subnet is 10.0.0.0/24, use for /L %i in (1,1,254) do ping -n 1 -w 100 10.0.0.%i. You may need to adjust your network settings to reach other subnets.
Q: What if ping broadcast doesn’t work?
A: Many routers block broadcast pings. Use the ping sweep method instead, which sends individual pings to each IP and is more reliable.
Q: Can I export the list to a file?
A: Yes, use redirection. For example, arp -a > devices.txt saves the output to a text file. You can also append > output.txt to any command.
Final Thoughts
Windows provides a surprisingly robust set of built-in tools for network discovery, no third-party software required. Start with a ping sweep and arp -a to get a baseline, then use nbtstat and nslookup to identify unknown devices. While these commands are powerful, they have limitations—for a truly comprehensive view, you might eventually consider third-party tools like Nmap, but mastering these native commands will serve you well in most everyday situations.