【问题标题】:Enable-PSRemoting (Set-WSManQuickConfig) and HyperV adapterEnable-PSRemoting (Set-WSManQuickConfig) 和 HyperV 适配器
【发布时间】:2020-06-10 05:20:21
【问题描述】:

安装 HyperV 并出现
vEthernet(默认开关)Hyper-V 虚拟以太网适配器
命令
Enable-PSRemoting(或 Set-WSManQuickConfig)
抛出异常:

 et-WSManQuickConfig : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859113" Machine="localhost"><f:Message><f:ProviderFault provider="Config provider" path="%systemroot%\system32
\WsmSvc.dll"><f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150859113" Machine="*******"><f:Message>WinRM firewall exception will not work since one of the network connection types
 on this machine is set to Public. Change the network connection type to either Domain or Private and try again. </f:Message></f:WSManFault></f:ProviderFault></f:Message></f:WSManFault>
At line:1 char:1
+ Set-WSManQuickConfig
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Set-WSManQuickConfig], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.SetWSManQuickConfigCommand

禁用虚拟交换机会带来正确的命令工作。
为什么会发生,可以解决吗?
操作系统:Windows 10; PSVersion - 5.1.18362.145

【问题讨论】:

    标签: hyper-v powershell-remoting


    【解决方案1】:

    如果在系统上发现“公共”网络连接类型,Microsoft 会认为 powershell 远程处理是有害的。这些是由 Hyper-V 创建的,作为默认的虚拟网络交换机。您可以使用命令行参数跳过此检查。

    Enable-PSRemoting -SkipNetworkProfileCheck
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-30
      • 1970-01-01
      • 1970-01-01
      • 2013-04-10
      • 1970-01-01
      • 2014-08-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多