尝试通过Windows Server 2019 VMAzure上的串行控制台通过Powershell命令启用Hyper-V时无法访问

问题描述

我在Azure中使用Windows Server 2019数据中心映像创建了一个VM。根据公司政策,我们不允许拥有公共IP和端口。访问虚拟机的唯一方法是使用串行控制台。

我能够在串行控制台中运行PowerShell。但是,我遇到了访问问题。

错误:

PS C:\windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Enable-WindowsOptionalFeature : Win32 internal error "Access is denied" 0x5
occurred while reading the console output buffer. Contact Microsoft Customer
Support Services.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (:) [Enable-WindowsOptionalFeature],HostException
    + FullyQualifiedErrorId : ReadConsoleOutput,Microsoft.Dism.Commands.Enable
   WindowsOptionalFeatureCommand

我尝试elevate the Powershell prompt,但没有运气。我创建的帐户应具有管理员权限。我想知道有什么方法可以使它正常工作。预先感谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)