https://github.com/ssg/wait-net
PowerShell module that provides cmdlets to wait for Internet connectivity to become available
https://github.com/ssg/wait-net
connectivity internet powershell
Last synced: 10 months ago
JSON representation
PowerShell module that provides cmdlets to wait for Internet connectivity to become available
- Host: GitHub
- URL: https://github.com/ssg/wait-net
- Owner: ssg
- License: mit
- Created: 2024-05-06T11:31:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T21:06:14.000Z (12 months ago)
- Last Synced: 2025-04-29T11:59:12.565Z (10 months ago)
- Topics: connectivity, internet, powershell
- Language: PowerShell
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Wait-Net
Powershell cmdlet to wait for Internet connectivity to establish again.
# About
I wrote this cmdlet while [the cafe I was sitting at](https://maps.app.goo.gl/CTFfxeigBRRJLW3Y6) lost its Internet connection. I wanted to be notified when Internet's back. I usually use `ping -t *some_known_ip_address*` to do that, but I didn't remember any
well-known IP addresses at the time. I remember 8.8.8.8 and 1.1.1.1, but I'm not sure if they responded to pings. This cmdlet is just a better way to wait until Internet connection is restored.
I also thought that a simple PowerShell cmdlet would be idiomatic and useful for similar purposes in other people's scripts.
# Installation
`Install-Module Wait-Net`
# Cmdlets
## `Wait-Net`
Wait until Internet connectivity is restored on at least one of the network adapters on the system. It accepts a `-Milliseconds` parameter to specify the
delay for checks which is 1000 (1 Second) by default.
By default, Wait-Net shows no output. Feel free to use `-Debug` switch if you want to see what it's doing while waiting.
## `Test-NetConnectivity`
This cmdlet just returns `$true` or `$false` if there is Internet connectivity.
# License
MIT License. See LICENSE.md for details.