Written by 6:31 pm Microsoft, PowerShell, Windows, Windows Server • 15 Comments

PowerShell: Ping IP range


Some you need to know which IP in a specific range is already in use. With Windows PowerShell there is a simple way to ping a IP range.

You can use the .Net class System.Net.Networkinformation.Ping to do this.

$ping = New-Object System.Net.Networkinformation.Ping
1..254 | % { $ping.send(“192.168.100.$_) | select address, status }

You can also have a look at the new Test-Connection or Test-NetConnection PowerShell cmdlets.

Tags: , , , , Last modified: August 18, 2018
Close Search Window