HyperV>脚本电源断开网卡连接(不是禁用!)
我寻找一个 powershell 脚本来断开在 HyperV 下运行的虚拟机的网卡。我找到了几个脚本,但它仅用于禁用。
我想让我的网卡保持“激活”状态。通过断开连接,我想模拟网络故障,例如电缆被拔出。
使用 SCVMM,有一个“断开连接”选项,并且它工作得很好(如果您在虚拟机中打开网络控制面板,您将看到状态是“网络电缆已拔出”而不是“网卡禁用”)。如果你能帮我用 powershell 编写这个脚本,那就太棒了,
谢谢大家
I look for a powershell script to disconnect the network card of Virtual machine running under HyperV. I found several script but it is only for disable.
I want to keep my network card 'activated'. By disconnected I want to simulate a network failure such as cable unplugged.
With SCVMM, there is an option to 'disconnect' and it works perfectly (if you open Network control panel in your vm, you will read status is 'Network cable unplugged' and not 'network card disable'). If you can help me to script this with powershell, it would be awesome
Thx for all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要查看 http://pshyperv.codeplex.com。
此 PowerShell 模块有多个用于管理 VM 网络的 cmdlet。
You may want to take a look at http://pshyperv.codeplex.com.
This PowerShell module has several cmdlets to manage VM network.