Closed donjuanal closed 1 year ago
Detect if active network interfaces are Private or public with the following code:
Get-NetAdapter | ? {-not $_.Virtual -and $_.Status -eq "Up" } | foreach {Get-NetConnectionProfile -InterfaceAlias $_.Name}
Output resembles this:
Name : Pretty Fly for a Wi-Fi InterfaceAlias : Wi-Fi InterfaceIndex : 10 NetworkCategory : Private IPv4Connectivity : LocalNetwork IPv6Connectivity : NoTraffic
Detect if active network interfaces are Private or public with the following code:
Get-NetAdapter | ? {-not $_.Virtual -and $_.Status -eq "Up" } | foreach {Get-NetConnectionProfile -InterfaceAlias $_.Name}
Output resembles this: