1. 连接ESXi服务器
Connect-VIServer -Server <IPAddress> -Protocol <https> -User <root> -Password <pass>
PS /root> Connect-VIServer -Server 10.1.1.1
Specify Credential
Please specify server credential
User: root
Password for user root: **********
Name Port User
---- ---- ----
10.1.1.1 443 root
2. 断开ESXi主机
Disconnect-VIServer -Server <IPAddress> -Force -Confirm:$False
PS /root> Disconnect-VIServer -Server 10.1.1.1 -Force -Confirm:$False