Home > Software design >  Powershell get interface from specific wlan
Powershell get interface from specific wlan

Time:10-14

I wanna create a script in powershell, which gives me the interface of a WLAN.

An example: I'm connected with WLAN A, but I want the interface from WLAN B. How can I get that?

Currently I'm using netsh wlan show interface. But with that I just get the interface from the currently connected WLAN.

Is it also possible, that I can do that, when I'm connected with a LAN-cable and wanna get the interface of a WLAN?

CodePudding user response:

# List all Network Adapters
Get-NetAdapter

# Get info on just Wireless Network
Get-NetAdapter -Name wi-fi | FL *

# Get more info on how to use Get-NetAdapter:

https://docs.microsoft.com/en-us/powershell/module/netadapter/get-netadapter?view=windowsserver2019-ps

  • Related