别裁伪体亲风雅,转益多师是汝师。这篇文章主要讲述PowerShell Get-NetAdapter 查看网络适配器的参数相关的知识,希望能为你提供帮助。
环境配置说明
- Windows 21H1
- PSVersion 5.1.19041.1320
示例
PS C:\\Users\\admin>
Get-NetAdapterNameInterfaceDescriptionifIndex StatusMacAddressLinkSpe
ed
------------------------------- -----------------------
Ethernet0Intel(R) 82574L Gigabit Network Conn...5 Up00-0C-29-13-86-411 Gbps
PS C:\\Users\\admin>
Get-NetAdapter -IncludeHiddenNameInterfaceDescriptionifIndex StatusMacAddressLinkSpe
ed
------------------------------- -----------------------
以太网(内核调试器)Microsoft Kernel Debug Network Adapter6 Not Present0 bps
Ethernet0Intel(R) 82574L Gigabit Network Conn...5 Up00-0C-29-13-86-411 Gbps
Teredo Tunneling Pseud...4 Not Present0 bps
Microsoft IP-HTTPS Pla...3 Not Present0 bps
6to4 Adapter2 Not Present0 bps
PS C:\\Users\\admin>
Get-NetAdapter | Format-ListName: Ethernet0
InterfaceDescription: Intel(R) 82574L Gigabit Network Connection
InterfaceIndex: 5
MacAddress: 00-0C-29-13-86-41
MediaType: 802.3
PhysicalMediaType: 802.3
InterfaceOperationalStatus : Up
AdminStatus: Up
LinkSpeed(Gbps): 1
MediaConnectionState: Connected
ConnectorPresent: True
DriverInformation: Driver Date 2018-06-12 Version 12.17.10.8 NDIS 6.50
PS C:\\Users\\admin>
Get-NetAdapter | Format-List *MacAddress: 00-0C-29-13-86-41
Status: Up
LinkSpeed: 1 Gbps
MediaType: 802.3
PhysicalMediaType: 802.3
AdminStatus: Up
MediaConnectionState: Connected
DriverInformation: Driver Date 2018-06-12 Version 12.17.10.8 NDIS 6.50
DriverFileName: e1i65x64.sys
NdisVersion: 6.50
ifOperStatus: Up
ifAlias: Ethernet0
InterfaceAlias: Ethernet0
ifIndex: 5
ifDesc: Intel(R) 82574L Gigabit Network Connection
ifName: ethernet_32769
DriverVersion: 12.17.10.8
LinkLayerAddress: 00-0C-29-13-86-41
Caption:
Description:
ElementName:
InstanceID: {EBBF1219-9164-48D0-8A73-353D46E10657}
CommunicationStatus:
DetailedStatus:
HealthState:
InstallDate:
Name: Ethernet0
OperatingStatus:
OperationalStatus:
PrimaryStatus:
StatusDescriptions:
AvailableRequestedStates:
EnabledDefault: 2
EnabledState: 5
OtherEnabledState:
RequestedState: 12
TimeOfLastStateChange:
TransitioningToState: 12
AdditionalAvailability:
Availability:
CreationClassName: MSFT_NetAdapter
DeviceID: {EBBF1219-9164-48D0-8A73-353D46E10657}
ErrorCleared:
ErrorDescription:
IdentifyingDescriptions:
LastErrorCode:
MaxQuiesceTime:
OtherIdentifyingInfo:
PowerManagementCapabilities:
PowerManagementSupported:
PowerOnHours:
StatusInfo:
SystemCreationClassName: CIM_NetworkPort
SystemName: DESKTOP-QSFMS09
TotalPowerOnHours:
MaxSpeed:
OtherPortType:
PortType:
RequestedSpeed:
Speed: 1000000000
UsageRestriction:
ActiveMaximumTransmissionUnit: 1500
AutoSense:
FullDuplex: True
LinkTechnology:
NetworkAddresses: {000C29138641}
OtherLinkTechnology:
OtherNetworkPortType:
PermanentAddress: 000C29138641
PortNumber: 0
SupportedMaximumTransmissionUnit:
AdminLocked: False
ComponentID: PCI\\VEN_8086&
DEV_10D3
ConnectorPresent: True
DeviceName: \\Device\\{EBBF1219-9164-48D0-8A73-353D46E10657}
DeviceWakeUpEnable: True
DriverDate: 2018-06-12
DriverDateData: 131732352000000000
DriverDescription: Intel(R) 82574L Gigabit Network Connection
DriverMajorNdisVersion: 6
DriverMinorNdisVersion: 50
DriverName: \\SystemRoot\\System32\\drivers\\e1i65x64.sys
DriverProvider: Microsoft
DriverVersionString: 12.17.10.8
EndPointInterface: False
HardwareInterface: True
Hidden: False
HigherLayerInterfaceIndices: {7}
IMFilter: False
InterfaceAdminStatus: 1
InterfaceDescription: Intel(R) 82574L Gigabit Network Connection
InterfaceGuid: {EBBF1219-9164-48D0-8A73-353D46E10657}
InterfaceIndex: 5
InterfaceName: ethernet_32769
InterfaceOperationalStatus: 1
InterfaceType: 6
iSCSIInterface: False
LowerLayerInterfaceIndices:
MajorDriverVersion: 12
MediaConnectState: 1
MediaDuplexState: 2
MinorDriverVersion: 17
MtuSize: 1500
NdisMedium: 0
NdisPhysicalMedium: 14
NetLuid: 1689399632855040
NetLuidIndex: 32769
NotUserRemovable: False
OperationalStatusDownDefaultPortNotAuthenticated : False
OperationalStatusDownInterfacePaused: False
OperationalStatusDownLowPowerState: False
OperationalStatusDownMediaDisconnected: False
PnPDeviceID: PCI\\VEN_8086&
DEV_10D3&
SUBSYS_07D015AD&
REV_00\\000C29FFFF138641
00
PromiscuousMode: False
ReceiveLinkSpeed: 1000000000
State: 2
TransmitLinkSpeed: 1000000000
Virtual: False
VlanID:
WdmInterface: False
PSComputerName:
CimClass: ROOT/StandardCimv2:MSFT_NetAdapter
CimInstanceProperties: {Caption, Description, ElementName, InstanceID...}
CimSystemProperties: Microsoft.Management.Infrastructure.CimSystemProperties
学习资料
- PowerShell 版本 + 工具
- PowerShell/PowerShell
- 51CTO社区
感恩曾经帮助过 师万物 的人。
学有余力的话,可以了解具有开源、跨平台特性的Powershell Core。
欢迎关注公众号:悟为生心
推荐阅读
- k8s中的容器优雅关闭,何为“优雅”
- PowerShell Where-Object 筛选出包含指定内容的行
- #yyds干货盘点#iptables防火墙
- 01 局域网yum 源仓库的安装
- PowerShell Get-PSRepository 查看存储库信息
- #yyds干货盘点#linux命令 –MAKEDEV 建立设备
- #yyds干货盘点#路由表的构成详解
- PowerShell KB MB GB TB PB在powershell的显示
- Flutter 专题30 图解自定义底部状态栏 ACEBottomNavigationBar #yyds干货盘点#