connect-viserver 192.168.31.13 –user ‘[email protected]’ –password ‘159917@Gmail2017’
PowerCLI常用命令列表:
1、Connect-VIServer – 连接虚拟化平台
2、get-vmhost – 显示ESXi主机列表
3、get-cluster – 显示群集列表
4、get-datastore – 显示存储列表
5、get-resourcepool – 显示资源池
6、get-vm – 显示虚拟机列表
7、get-virtualswitch – 显示虚拟交换机列表
8、start-vm\stop-vm – 启动或关闭虚拟机
9、new-vm – 创建虚拟机
10、get-template – 显示模板列表
11、get-oscustomizationspec – 显示自定义规范列表
12、get-vapp – 显示vapp应用列表
13、get-folder – 显示文件夹列表
14、get-vicommand – 显示所有命令列表
15、get-helo–帮助信息
状态确实为Restricted
get-executionpolicy
更改Restricted属性(按y)
set-executionpolicy remotesigned
关闭PowerCLI重启测试登录
connect-viserver 192.168.31.13 –user ‘[email protected]’ –password ‘159917@Gmail2017’