比如想得到“本地连接”这个名字网卡的settingid,用下面这两命令
先用- wmic nic where Netconnectionid="本地连接" get name,index
复制代码 这个得到该网卡的index(这里比如得到了1),然后用这个index得到这个网卡对应的settingid- wmic nicconfig where index=1 get settingid
复制代码 这样就可以了,如下图- D:\>wmic nic where Netconnectionid="本地连接" get name,index
- Index Name
- 1 VIA Rhine II Fast Ethernet Adapter
-
-
- D:\>wmic nicconfig where index=1 get settingid
- SettingID
- {D9BD305C-80FB-43B5-BE3B-0B3AB4D5E227}
复制代码
|