A high-performance PowerShell script that monitors IP address ranges for connectivity changes in real-time. Designed for network administrators who need immediate notifications when devices come online or go offline.
- ⚡ Ultra-fast parallel scanning - Monitor 254 IPs in ~2-3 seconds
- 🎯 Real-time change detection - Instant notifications when devices change state
- 🔍 Smart verification - Reduces false positives from network fluctuations
- 🖥️ Cross-platform - Works on PowerShell 5.1+ and PowerShell 7+
- 📱 Clean output - Shows only what matters: state changes
- ⚙️ Configurable - Adjust timeout, scan interval, and thread count
# Download and run
.\ip-monitor.ps1
# Enter IP range when prompted
Enter IP range: 192.168.1.1-254
# Monitor output
Ready. UP: 12, DOWN: 242 (scan: 2.1s)
....
[15:30:15] 192.168.1.100 changed from DOWN to UP
....
- Windows/Linux/macOS with PowerShell 5.1 or later
- Network access to target IP ranges
- ICMP ping enabled on target devices (or network path)
.\ip-monitor.ps1
# Fast scanning (3-second intervals, 400ms timeout)
.\ip-monitor.ps1 -ScanInterval 3 -PingTimeout 400 -ThrottleLimit 100
# Conservative scanning (10-second intervals, 2-second timeout)
.\ip-monitor.ps1 -ScanInterval 10 -PingTimeout 2000 -ThrottleLimit 30
192.168.1.1-254 # Short format (recommended)
192.168.1.1-192.168.1.254 # Full format
10.0.0.1-10.0.0.100 # Any valid range
172.16.0.1-172.16.0.50 # Partial ranges
Parameter | Default | Description |
---|---|---|
ScanInterval |
5 | Seconds between scans |
PingTimeout |
600 | Ping timeout in milliseconds |
ThrottleLimit |
80 | Number of parallel ping threads |
# Ultra-fast mode
.\ip-monitor.ps1 -ScanInterval 2 -PingTimeout 300 -ThrottleLimit 120
# Balanced mode (default)
.\ip-monitor.ps1 -ScanInterval 5 -PingTimeout 600 -ThrottleLimit 80
# Slow/reliable mode
.\ip-monitor.ps1 -ScanInterval 15 -PingTimeout 3000 -ThrottleLimit 40
IP Count | Typical Scan Time | Recommended Settings |
---|---|---|
1-50 IPs | 0.5-1 seconds | Default settings |
51-100 IPs | 1-2 seconds | Default settings |
101-254 IPs | 2-4 seconds | Default or faster timeout |
255+ IPs | 4+ seconds | Increase ThrottleLimit to 100+ |
- Faster detection: Lower
PingTimeout
(300-500ms) - More reliable: Higher
PingTimeout
(1000-2000ms) - Larger ranges: Increase
ThrottleLimit
(100-150) - Older systems: Decrease
ThrottleLimit
(30-50)
# Monitor server farm
.\ip-monitor.ps1
Enter IP range: 10.0.1.1-100
# Watch for new devices on DHCP range
.\ip-monitor.ps1 -ScanInterval 3
Enter IP range: 192.168.1.100-200
# Detect unauthorized devices
.\ip-monitor.ps1 -ScanInterval 10
Enter IP range: 192.168.1.1-254
# Monitor critical infrastructure
.\ip-monitor.ps1 -PingTimeout 1000 -ScanInterval 30
Enter IP range: 10.0.0.1-50
Fast Ping Monitor (Timeout: 600ms, Threads: 80)
Enter IP range (e.g. 192.168.0.1-254): 192.168.1.1-254
Monitoring 254 IPs every 5s. Press Ctrl+C to stop.
Ready. UP: 25, DOWN: 229 (scan: 2.3s)
............................
[14:25:33] 192.168.1.101 changed from DOWN to UP
.................
[14:26:15] 192.168.1.200 changed from UP to DOWN
[14:26:15] 192.168.1.201 changed from UP to DOWN
....................
Legend:
...
= No changes detected (normal operation)- Green text = Device came online (DOWN → UP)
- Red text = Device went offline (UP → DOWN)
"No changes detected but I know devices are changing"
- Increase
PingTimeout
(devices may be slow to respond) - Decrease
ScanInterval
for faster detection - Check if ICMP ping is blocked by firewalls
"Too many false positives"
- Increase
PingTimeout
for more reliable detection - Increase
ScanInterval
to reduce network load - Network may have intermittent connectivity issues
"Script is too slow"
- Decrease
PingTimeout
(600ms → 400ms) - Increase
ThrottleLimit
(80 → 120) - Use smaller IP ranges for testing
"High CPU usage"
- Decrease
ThrottleLimit
(80 → 50) - Increase
ScanInterval
(5 → 10 seconds) - Update to PowerShell 7+ for better performance
# For PowerShell 7+ (fastest)
.\ip-monitor.ps1 -ThrottleLimit 120 -PingTimeout 400
# For PowerShell 5.1 (compatible)
.\ip-monitor.ps1 -ThrottleLimit 60 -PingTimeout 800
# For slow networks
.\ip-monitor.ps1 -PingTimeout 2000 -ScanInterval 10
- ICMP dependency: Requires ping (ICMP) to be enabled on target devices
- Firewall limitations: May not detect devices with strict firewall rules
- Network load: High-frequency scanning can generate significant network traffic
- Windows Defender: May trigger network scanning alerts on some systems
This project is released under the MIT License. Feel free to use, modify, and distribute.
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
💡 Pro Tip: Start with default settings and adjust parameters based on your network's behavior and performance requirements.