本周一晚新公司部门部分人员聚餐,圆桌九人围坐,80后占其八,皆五年以上IT龄,老大为长者。
席间玩一游戏,找众将之共同点,
一人曰,有白发者喝酒,众将皆举杯,皆尽。
首先到官方网站下载VMware vSphere PowerCLI的软件包,
安装软件到本机,
运行后提示:”无法加载文件c:program Filesvmwareinfrastructurevsphere powerCLIscriptinitialize-vitoolkitenviroment.ps1,因为在此系统中禁止执行脚本。有关信息,请查阅“get-help about_signing”.
通过get-executionpolicy查看本地执行策略
更改执行策略
更改为RemoteSigned执行策略
备注:
Restricted 执行策略不允许任何脚本运行。
AllSigned 和 RemoteSigned 执行策略可防止 Windows PowerShell 运行没有数字签名的脚本。
再次运行VMware vSphere PowerCLI,提示”Welcome“界面,工具正常启动。
输入Connect-VIServer ,连接上vCenter服务器
输入vCenter的登录用户名和密码。