Last active
July 5, 2021 13:52
-
-
Save programmeruser2/45f3cbc2eedb79dad6809b9bb50510d3 to your computer and use it in GitHub Desktop.
Get the Wi-Fi or Ethernet IP Address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.AddressState -eq "Preferred" -and ($_.InterfaceAlias -eq "Wi-Fi" -or $_.InterfaceAlias -eq "Ethernet")}).IPAddress |
Author
programmeruser2
commented
Jun 28, 2021
iwr https://gist.githubusercontent.com/programmeruser2/45f3cbc2eedb79dad6809b9bb50510d3/raw/b491f7b16992776488467f9675800b993418657a/ip.ps1 | iex
iwr https://gist.githubusercontent.com/programmeruser2/45f3cbc2eedb79dad6809b9bb50510d3/raw/b491f7b16992776488467f9675800b993418657a/ip.ps1 | iex
What?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment