How to Scan a Network to Detect Free and Used IP Addresses (With Device Names)
Table of Contents
Windows Server 2025 delivers a more efficient networking stack, improved PowerShell performance, and better DNS handling. Thanks to these improvements, administrators can scan entire subnets, discover active devices, detect unused IP addresses, and generate detailed inventory reports — without installing any third-party tools.
In this guide, you’ll learn how to perform a complete network IP scan using only native Windows Server 2025 tools, including:
- PowerShell 7.4 (included in Windows Server 2025)
- Built-in ICMP and DNS utilities
- ARP / NBTSTAT / NSLOOKUP
- Exporting reports directly from the server
This is ideal for administrators managing enterprise networks, lab environments, DHCP scopes, or troubleshooting IP conflicts.
Why You Should Scan IP Addresses in Windows Server 2025
IIn Windows Server 2025, maintaining accurate IP address management is more critical than ever, particularly in modern hybrid and distributed network environments. Conducting regular subnet scans provides administrators with essential visibility into their address space, enabling them to quickly distinguish between active and available IP addresses. This insight is key to preventing conflicts and ensuring consistent network performance.
Subnet scanning also plays a vital role in identifying unauthorized or rogue devices, strengthening overall security posture. At the same time, clear visibility into IP utilization supports effective network capacity planning, including informed adjustments to DHCP scopes and future expansion strategies.
Accurate IP data additionally contributes to audit readiness and compliance documentation, ensuring organizations can demonstrate control over their network infrastructure. Moreover, comprehensive scans assist in diagnosing operational issues by helping uncover DNS inconsistencies, unreachable hosts, and general connectivity problems.
With the improved networking stack and enhanced PowerShell engine in Windows Server 2025, IP scanning operations are significantly faster, more efficient, and more reliable, making proactive network management easier and more effective than ever.
Method 1: Scan the Network Using PowerShell 7.4 (Recommended)
Windows Server 2025 includes PowerShell 7.4 by default, which improves parallel processing and DNS resolution speed — perfect for subnet scanning.
Step 1 — Open PowerShell 7.4
Start Menu → Windows PowerShell 7.4 (Admin)
Step 2 — Run the Advanced Subnet Scanner Script
Replace 192.168.1. with your subnet.
$network = "192.168.1."
$results = ForEach ($i in 1..254) {
$ip = "$network$i"
if (Test-Connection -Count 1 -Quiet -TimeoutSeconds 1 $ip) {
try {
$name = [System.Net.Dns]::GetHostEntry($ip).HostName
} catch {
$name = "Unknown"
}
[PSCustomObject]@{
IPAddress = $ip
Status = "Used"
Device = $name
}
} else {
[PSCustomObject]@{
IPAddress = $ip
Status = "Free"
Device = "-"
}
}
}
$results | Format-Table
Why this script works well on Server 2025
- Faster DNS lookups due to networking improvements
- Reduced ICMP latency
- PowerShell 7.4 multithreading enhancements
- Better reliability in large VLAN environments
This script automatically detects active IPs and resolves their hostnames using the server’s DNS.
Method 2: Export Scan Results to CSV or HTML
Windows Server 2025 PowerShell includes optimized CSV and HTML export modules.
Export to CSV
$results | Export-Csv -NoTypeInformation -Path "C:\IP_Scan_Report_2025.csv"
Export to HTML
$results | ConvertTo-Html | Out-File "C:\IP_Scan_Report_2025.html"
These reports are ideal for audits, documentation, and inventory management.
Method 3: Scan Using CMD Tools Included in Windows Server 2025
Even though PowerShell is faster, classic CMD tools still work.
Step 1 — Ping Sweep
for /l %i in (1,1,254) do @ping -n 1 -w 100 192.168.1.%i | find "Reply"
This Windows CMD command performs a simple subnet ping sweep:
This loop pings every IP from 192.168.1.1 to 192.168.1.254 with a 100-ms timeout. It sends one ping (-n 1) to each address, and the find "Reply" filter shows only IPs that respond—essentially listing active hosts on the subnet.
Step 2 — Collect ARP Results
arp -a
This will show:
- All active IP addresses
- Corresponding MAC addresses
- Local interface bindings
Note: CMD methods cannot find free IPs automatically, but they help confirm active devices.
Method 4: Resolve Device Names from Windows Server 2025
You can resolve hostnames from the DNS server running on Server 2025.
DNS Lookup
NetBIOS Device Name Lookup
nbtstat -A 192.168.1.10
Both commands work well in domains, hybrid AD/DNS environments, and legacy networks.
Example of a Windows Server 2025 IP Scan Report
| IP Address | Status | Device Name |
|---|---|---|
| 192.168.1.2 | Used | DC01.corp.local |
| 192.168.1.10 | Used | Admin-PC01.corp.local |
| 192.168.1.25 | Free | – |
| 192.168.1.60 | Used | SQL-SRV2025.corp.local |
| 192.168.1.150 | Free | – |
Enhancing the Script for Windows Server 2025
Add timestamp support:
ScanTime = (Get-Date)
The above command adds a property called ScanTime to each scan result and assigns it the current date and time. It is used to timestamp when each IP address was scanned.
Add MAC address detection:
$mac = (arp -a $ip | Select-String $ip).ToString().Split(" ",[System.StringSplitOptions]::RemoveEmptyEntries)[1]
The command runs arp -a for the specific IP, filters the output to the line containing that IP, converts it to text, splits the line into separate fields, and extracts the second field, which is the MAC address. Essentially, it pulls the MAC address associated with that IP from the ARP table.
Add ping round-trip time (RTT):
$rtt = (Test-Connection $ip -Count 1).ResponseTime
This command sends a single ping to the IP address and captures the round-trip time (RTT) of the response. It stores the ping latency (in milliseconds) in the variable $rtt, which can be used to measure how quickly the host responds. Windows Server 2025 handles these enhanced network calls efficiently.
Conclusion
Windows Server 2025 gives system administrators powerful built-in tools to scan networks, detect free and used IP addresses, and gather device names — all without installing additional software.
Using PowerShell 7.4, ARP, nslookup, and built-in ICMP utilities, you can:
✔ Identify active devices
✔ Detect unassigned IP addresses
✔ Resolve hostnames automatically
✔ Generate clean reports for documentation
✔ Maintain a secure, well-documented network
This method is fast, secure, and perfectly suited for modern Windows Server 2025 environments.
Below is the optimized PowerShell 7.4 subnet-scanning script for Windows Server 2025, designed for speed, accuracy, DNS resolution, and clean reporting.
This script uses parallel processing, improved DNS lookups, ARP parsing, and structured output.
- Design



![Windows Server 2025 LTSC [10.0.26100.7171] Version 24H2 4 Windows Server 2025 LTSC [10.0.26100.7171] Version 24H2](https://vmorecloud.com/wp-content/uploads/2025/12/Windows-Server-2025-365x330.jpg)
