gpt4 book ai didi

windows - 如何在 Windows 7 中使用批处理脚本获取本地连接名称

转载 作者:可可西里 更新时间:2023-11-01 09:46:04 26 4
gpt4 key购买 nike

我正在编写一个简单的批处理脚本来检索 Windows 上的所有网络接口(interface)。但我只需要本地连接名称。本地连接接口(interface)名称不是默认的。有什么方法可以使用批处理脚本仅检索本地连接名称作为字符串?

最佳答案

不完全确定你在问什么,但我想你的问题是你想获得网络接口(interface)的所有友好名称。

是这样的:

wmic nic where "netconnectionid like '%'" get netconnectionid

返回(在我的笔记本电脑上)

NetConnectionID
Local Area Connection
Wireless Network Connection
Bluetooth Network Connection
VirtualBox Host-Only Network

关于windows - 如何在 Windows 7 中使用批处理脚本获取本地连接名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10042354/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com