How to get meaningful network interface names instead of GUIDs with netifaces under Windows?

前端 未结 6 809
天涯浪人
天涯浪人 2020-12-05 18:52

I use the netifaces module.

import netifaces
print netifaces.interfaces()

but this shows the result below:

 [\         


        
6条回答
  •  余生分开走
    2020-12-05 19:53

    It's a lot easier in PowerShell:

    Get-WmiObject -Class Win32_NetworkAdapterConfiguration | 
        Select-Object Description, SettingID, MACAddress | 
        Format-Table -AutoSize
    

提交回复
热议问题