Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
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:
This is ideal for administrators managing enterprise networks, lab environments, DHCP scopes, or troubleshooting IP conflicts.
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.
Windows Server 2025 includes PowerShell 7.4 by default, which improves parallel processing and DNS resolution speed — perfect for subnet scanning.
Start Menu → Windows PowerShell 7.4 (Admin)
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
This script automatically detects active IPs and resolves their hostnames using the server’s DNS.
Windows Server 2025 PowerShell includes optimized CSV and HTML export modules.
$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.
Even though PowerShell is faster, classic CMD tools still work.
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.
arp -a
This will show:
Note: CMD methods cannot find free IPs automatically, but they help confirm active devices.
You can resolve hostnames from the DNS server running on Server 2025.
NetBIOS Device Name Lookup
nbtstat -A 192.168.1.10
Both commands work well in domains, hybrid AD/DNS environments, and legacy networks.
| 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 | – |
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.
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.
