如何在中获得网络适配器的类型(Wi、以太网、蓝牙)?
目前我正在使用:get-wmiobject win32_networkadapter -filter "PhysicalAdapter = true" | select *
它提供了关于每个适配器的大量信息。属性"name“包含某种指示它是哪种类型的设备,但是是否有类似于Id的东西来告诉我该类型:
下面是一个适配器的示例:
PSComputerName : XXXXXXXXXXXX
Availability : 3
Name : Intel(R) Wi-Fi 6 AX201 160MHz
Status :
StatusInfo :
DeviceID : 2
__GENUS : 2
__CLASS : Win32_NetworkAdapter
__SUPERCLASS : CIM_NetworkAdapter
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_NetworkAdapter.DeviceID="2"
__PROPERTY_COUNT : 40
__DERIVATION : {CIM_NetworkAdapter, CIM_LogicalDevice, CIM_LogicalElement, CIM_ManagedSystemElement}
__SERVER : XXXXXXXX
__NAMESPACE : root\cimv2
__PATH : \\XXXXXXXXX\root\cimv2:Win32_NetworkAdapter.DeviceID="2"
AdapterType : Ethernet 802.3
AdapterTypeId : 0
AutoSense :
Caption : [00000002] Intel(R) Wi-Fi 6 AX201 160MHz
ConfigManagerErrorCode : 0
ConfigManagerUserConfig : False
CreationClassName : Win32_NetworkAdapter
Description : Intel(R) Wi-Fi 6 AX201 160MHz
ErrorCleared :
ErrorDescription :
GUID : {FDFFD175-8A12-4FFC-B5A7-583B96A192C0}
Index : 2
InstallDate :
Installed : True
InterfaceIndex : 26
LastErrorCode :
MACAddress : BC:17:B8:61:B8:9A
Manufacturer : Intel Corporation
MaxNumberControlled : 0
MaxSpeed :
NetConnectionID : WLAN
NetConnectionStatus : 2
NetEnabled : True
NetworkAddresses :
PermanentAddress :
PhysicalAdapter : True
PNPDeviceID : PCI\VEN_8086&DEV_06F0&SUBSYS_00708086&REV_00\3&11583659&0&A3
PowerManagementCapabilities :
PowerManagementSupported : False
ProductName : Intel(R) Wi-Fi 6 AX201 160MHz
ServiceName : Netwtw10
Speed : 1451650000
SystemCreationClassName : Win32_ComputerSystem
SystemName : XXXXXXXXX
TimeOfLastReset : 20220104082447.500000+060
Scope : System.Management.ManagementScope
Path : \\20IAV500030N-0\root\cimv2:Win32_NetworkAdapter.DeviceID="2"
Options : System.Management.ObjectGetOptions
ClassPath : \\XXXXXXXX\root\cimv2:Win32_NetworkAdapter
Properties : {AdapterType, AdapterTypeId, AutoSense, Availability...}
SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers : {dynamic, Locale, provider, UUID}
Site :
Container :
发布于 2022-09-27 12:29:49
Get-NetAdapter | ft Name,InterfaceDescription,PhysicalMediaType,NdisPhysicalMedium -AutoSize
结果就像
NdisPhysicalMedium在哪里
发布于 2022-01-04 14:34:01
以下PowerShell命令返回适配器的类型:
Get-NetAdapter * | Format-List -Property "Name", "InterfaceDescription" ,"PhysicalMediaType"
样本输出:
Name : WLAN
InterfaceDescription : Intel(R) Wi-Fi 6 AX201 160MHz
PhysicalMediaType : Native 802.11
Name : vEthernet (Default Switch)
InterfaceDescription : Hyper-V Virtual Ethernet Adapter
PhysicalMediaType : Unspecified
Name : Bluetooth-Netzwerkverbindung
InterfaceDescription : Bluetooth Device (Personal Area Network)
PhysicalMediaType : BlueTooth
Name : Ethernet 2
InterfaceDescription : Intel(R) Ethernet Connection (10) I219-LM
PhysicalMediaType : 802.3
PhysicalMediaType
802.3
-> EthernetBlueTooth
->猜测whatNative 802.11
-> WLANThx到@AdminOfThings的支持!
https://stackoverflow.com/questions/70579956
复制相似问题