PowerShell IP Scanner

Command prompt and PowerShell Forum
Post Reply
User avatar
hepek
Site Admin
Posts: 451
Joined: 24 Oct 2018, 00:03
Location: @HEPEK HQ
Contact:

PowerShell IP Scanner

Post by hepek »

Simple IP Range Scan using PowerShell

Just Edit the Scope, in this case 192.168.0.$

The Script Scanns the IP Addresses and Resolves the Hostnames if Possible.

Code: Select all

1..254 | ForEach-Object {Get-WmiObject Win32_PingStatus -Filter "Address='192.168.0.$_' and Timeout=200 and ResolveAddressNames='true' and StatusCode=0" | select ProtocolAddress*}
ReciSvakom
Posts: 1
Joined: 12 May 2020, 19:32

Re: PowerShell IP Scanner

Post by ReciSvakom »

Very useful, thank you for sharing.
Post Reply

Return to “PowerShell”