【发布时间】:2021-11-09 13:19:26
【问题描述】:
我现在正在尝试在 Windows 11 中编写一个 powershell 脚本,它应该会自动配置一个 USB 到以太网适配器。为此,我需要自动配置适配器的 VLAN。
万一 VLAN 已在网络对话框中使用
激活,一切正常Set-NetAdapter -Name Adapter -VlanID 999
如果网络适配器尚未配置,脚本将失败并显示:
Set-NetAdapter : Requested operation not supported on adapter
屏幕截图显示了如何在适配器上禁用 VLAN。
有谁知道如何在设置 VLAN ID 之前首先使用 powershell 启用 VLAN?
【问题讨论】:
标签: powershell networking ethernet vlan windows-11