1.
Get-WmiObject -Class Win32_NetworkAdapterConfiguration ` -filter "IPEnabled = $true"
2.
Get-WmiObject -Class Win32_NetworkAdapter | Format-Table -Property Name, NetConnectionStatus -AutoSize
3.netsh interface show interface
PS脚本获取网络适配器状态
时间: 2024-11-10 11:19:08