Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    123
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Splitting wifi interfaces

    I haven't gotten real familiar yet with NETSH. I use it for displaying the wifi networks and such.
    I need to know how (if possible) to use it to display just wifi 1, wifi 2, wifi 3, etc interfaces but not all at once. Can someone help on this? Big thanks if you can show the netsh command and perhaps explain how the parts of the command relate.

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,191
    Thanks
    48
    Thanked 985 Times in 915 Posts
    Is this what you had in mind?

    cheers, Paul

    Code:
    Usage: show networks [[interface=]<string>] [[mode=]ssid/bssid]
    
    Parameters:
    
        Tag             Value
        interface     - Name of the interface which has this profile configured.
        mode          - Get detailed bssid information.
    
    Remarks:
    
        Shows the networks available to the system.
        Parameter interface and bssid are both optional.
    
        If interface name is given, only the networks on the given
        interface will be listed. Otherwise, all networks visible to
        the system will be listed.
    
        If mode=bssid is given then the visible bssids for each ssid
        will also be listed. Otherwise only ssids will be listed.
    
    Examples:
    
        show networks interface="Wireless Network Connection"
        show networks mode=Bssid
        show networks

  3. #3
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    123
    Thanks
    19
    Thanked 0 Times in 0 Posts
    Close as far as networks goes.
    I have 2 wifi adapters connected so when I do netsh wlan show networks mode=bssid,
    I get 2 set of interface values. I would like to select which of the 2 I need.
    I can do it with for commands but by the time I get the node and value I want from it the time involed is leeeeenthy.

  4. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Spark,

    Exactly which "interface values do you want"? I feel the need to do a little PowerShell programming so if you'll tell me what you want I'll see if I can whip up a little utility for you.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. #5
    jwoods
    Guest
    That information should be available in System Information > Components > Network > Adapters.

  6. #6
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Spark,

    Here's a first pass at this the following code will list your installed Adapters and let you select by number then present all the details of the configuration.
    Code:
    Clear-Host
    
    $Adapters = Get-NetAdapter
    $AdptCnt  = $Adapters.Count
    
    for ($cntr = 0;$cntr -lt $AdptCnt; $cntr++) {
      Write-Host "$cntr - $($Adapters[$cntr].Name)"
    }
    
    $Sel = Read-Host "Make a selection"
    
    if ($Sel -eq "" -or $Sel -ge $adptcnt) {
    
        Write-Host "`nYour input was out of range or missing!"
    
    }
    Else {
    
      $Sel = $Adapters[$Sel].Name
      Get-NetIPConfiguration -InterfaceAlias $Sel -detailed | fl
    
    }
    Sample Output:
    0 - Ethernet
    1 - Wi-Fi
    2 - VirtualBox Host-Only Network
    3 - Bluetooth Network Connection
    Make a selection: 0


    ComputerName : DELLXPS8700
    InterfaceAlias : Ethernet
    InterfaceIndex : 4
    InterfaceDescription : Realtek PCIe GBE Family Controller
    NetAdapter.LinkLayerAddress : B8-CA-3A-8E-35-D3
    NetAdapter.Status : Up
    NetProfile.Name : ComputerMentor
    NetProfile.NetworkCategory : Private
    NetProfile.IPv6Connectivity : LocalNetwork
    NetProfile.IPv4Connectivity : Internet
    IPv6LinkLocalAddress : fe80::38d0:9d5d:e0b4:a94a%4
    IPv4Address : 192.168.1.101
    IPv6DefaultGateway :
    IPv4DefaultGateway : 192.168.1.1
    NetIPv6Interface.NlMTU : 1500
    NetIPv4Interface.NlMTU : 1500
    NetIPv6Interface.DHCP : Enabled
    NetIPv4Interface.DHCP : Enabled
    DNSServer : 192.168.1.1
    Tests can be incorporated to only show active adapters and only display selected details. HTH

    P.S. If you have never used PowerShell see this Thread posts #2.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  7. #7
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Spark,

    Here's an updated version that prevents errors if you select an adapter that is not enabled. Also prompt to continue if run from a shortcut.
    Code:
    Clear-Host
    
    $Adapters = Get-NetAdapter
    $AdptCnt  = $Adapters.Count
    
    for ($cntr = 0;$cntr -lt $AdptCnt; $cntr++) {
      Write-Host "$cntr - $($Adapters[$cntr].Name)"
    }
    
    $Sel = Read-Host "Make a selection"
    
    if ($Sel -eq "" -or $Sel -ge $AdptCnt) {
    
        Write-Host "`nYour input was out of range or missing!"
    
    }
    
    Else {
          if ($Adapters[$Sel].Status -eq "UP") {
    
            $Sel = $Adapters[$Sel].Name
            Get-NetIPConfiguration -InterfaceAlias $Sel -detailed | fl
          }
          Else {
                 Write-Host "`n$($Adapters[$Sel].Name) not Active!"
               }
    
          }  
    
    Read-Host "Press a key to continue."
    HTH
    Last edited by RetiredGeek; 2015-06-17 at 12:43.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •