简体   繁体   中英

Powershell — changing Network Adapter's Name/Description

I've been working with many VMs and doing some monitoring stuff. My current problem is that the Network Adapter/Interface name in Perfmon seems to vary across operating system. It can be anything from Microsoft Hyper-V Network Adapter to Microsoft Network Adapter #3.

I've been looking into registry editing stuff, but it doesn't seem to be easy since they are stored in ridiculously ugly GUID sets.

I've also considered using the win32_networkadapter class under wmi-objects, but I seem to be only able to get, not set, the interfacedescription property (which I'm not even sure would affect Perfmon's counter name).

Any guidance would be very much appreciated!

If you are using server 2012 or windows 8.1's Hyper-V there are a few commands that could do this.

Get-Vmnetworkadapter and set-vmnetworkadapter

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM