我正在Windows 10上运行microsoft/windowsservercore
容器,并尝试以任何可能的方式从容器内重命名网络适配器。这将是一个简单的任务,通过PowerShell,如下所示:
Rename-NetAdapter -Name 'Ethernet 2' -NewName 'WuTangLan'
但是会出现以下错误:
Rename-NetAdapter : A general error occurred that is not covered by a more specific error code.
At line:1 char:1
+ Rename-NetAdapter -Name 'Ethernet 2' -NewName 'WuTangLan'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_NetAdapter..."3e77a8955741"):ROOT/StandardCimv2/MSFT_NetAdapter) [
Rename-NetAdapter], CimException
+ FullyQualifiedErrorId : HRESULT 0x800106d9,Rename-NetAdapter
有没有办法从容器中重命名网络适配器?