简体   繁体   English

Powershell —更改网络适配器的名称/说明

[英]Powershell — changing Network Adapter's Name/Description

I've been working with many VMs and doing some monitoring stuff. 我一直在使用许多VM,并做一些监视工作。 My current problem is that the Network Adapter/Interface name in Perfmon seems to vary across operating system. 我当前的问题是Perfmon中的网络适配器/接口名称似乎在整个操作系统中都不同。 It can be anything from Microsoft Hyper-V Network Adapter to Microsoft Network Adapter #3. 从Microsoft Hyper-V网络适配器到Microsoft网络适配器#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. 我一直在研究注册表编辑的内容,但这似乎并不容易,因为它们存储在非常丑陋的GUID集中。

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). 我还考虑过在wmi-objects下使用win32_networkadapter类,但是我似乎只能获取而不是设置interfacedescription属性(我什至不确定是否会影响Perfmon的计数器名称)。

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. 如果您使用的是Server 2012或Windows 8.1的Hyper-V,则有一些命令可以执行此操作。

Get-Vmnetworkadapter and set-vmnetworkadapter Get-Vmnetworkadapter和set-vmnetworkadapter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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