1. 安装

  • 安装(略)
  • 开启配置:服务器开启后,配置计算机名、配置远程管控功能开启、远程桌面开启、ip地址固定
    image

2. 服务器配置

  • powershell命令,开启credssp
C:\Users\Administrator>powershell
PS C:\Users\Administrator> Enable-PSRemoting
PS C:\Users\Administrator> Enable-WSManCredSSP -role server
  • 关闭防火墙
PS C:\Users\Administrator> netsh advfirewall set currentprofile state off
# 确定

image-1673579574600

3.客户端配置Hyper-V管理器

  • 启用Hyper-V管理工具(不要勾选Hyper-V平台,否则会影响你的vm虚拟机)
    image-1673579610436
  • 修改hosts文件:
192.168.100.100  hyper-v-server
  • 客户端工作组不能为“公用”
Win-设置-网络和Internet-状态-更改连接属性,公用改为“专用”
  • 修改组策略
gpedit.msc----本地计算机策略----管理工具----系统----凭证分配:允许分配新的凭证用于仅NTLM服务器身份验证
启用并添加一行值:wsman/HYPER-V-SERVER

image-1673579691547

  • powershell执行命令:
开启winrm:winrm quickconfig
winrm安全配置:Set-Item WSMan:\localhost\Client\TrustedHosts -Value "HYPER-V-SERVER"
winrm身份验证配置:Enable-WSManCredSSP -Role client -DelegateComputer "HYPER-V-SERVER"

image-1673579713543

4.hyper-v管理器连接服务器

  • 客户端测试连接:windows管理工具中打开Hyper-V管理器
  • 操作—连接服务器,输入要连接的服务器即可
    image-1673579733906