- VMware vSphere 5.1 Cookbook
- Abhilash GB
- 362字
- 2021-08-13 16:56:30
Preparing VMware PowerCLI for first use
All the tasks performed on the Auto Deploy server are done using VMware PowerCLI commands. Hence, it is a requirement to have VMware vSphere PowerCLI installed and configured for use.
At the time of writing this book, the latest available version was VMware-PowerCLI-5.0.1-581491. Download and install VMware PowerCLI from the following URL:
The installation of PowerCLI is pretty straight-forward. Just go through the wizard defaults and finish the installation. Once the installation is complete, it needs to be configured so that it can be used in your environment.
How to do it…
The following procedure will help you configure VMware PowerCLI for first use and also add the vCenter Server that will be used to manage the ESXi servers which you plan to deploy in your environment:
- If VMware PowerCLI is being installed for the first time, you need to make sure that you issue the command to set the execution policy to either
RemoteSigned
orUnrestricted
, by issuing any of the following commands:Set-ExecutionPolicy Unrestricted
Or
Set-ExecutionPolicy RemoteSigned
- Close the PowerCLI window and re-open it. You should see vSphere PowerCLI welcome screen.
- Connect the vCenter Server to VMware PowerCLI, by issuing the following command:
Syntax:
Connect-VIServer FQDN or IP address of the vCenter
Example:
Connect-VIServer vcenter51.vdescribed.com
How it works…
VMware PowerCLI is a set of cmdlets based on Microsoft Power Shell.
The Set-Execution policy cmdlet will determine what type of PowerCLI commands/scripts are allowed to run from the computer where VMware PowerCLI is installed. There are four types of execution policy, such as Restricted
, AllSigned
, RemoteSigned
, and Unrestricted
.
The default execution policy is Restricted
, which does not allow running any scripts.
- Setting it to
RemoteSigned
will allow running scripts/cmdlets signed by a trusted publisher, in this case VMware Inc. - Setting it to
Unrestricted
will impose no restrictions.
The Connect-VIServer cmdlet can be used to connect either the vCenter Server or the ESXi host. But for you to be able to address Clusters, Folders, and Host Profiles when creating a deploy rule, you will need vCenter level access. Therefore, you will need to connect to the vCenter Server and not the ESXi server.
- Linux設備驅動開發詳解(第2版)
- Linux運維實戰:CentOS7.6操作系統從入門到精通
- Linux實戰
- 計算機系統開發與優化實戰
- 深入Linux內核架構與底層原理(第2版)
- Windows Phone 8 Application Development Essentials
- Docker+Kubernetes應用開發與快速上云
- Kali Linux高級滲透測試
- Linux 從入門到項目實踐(超值版)
- VMware Horizon Mirage Essentials
- Windows網絡編程(第2版)
- 鴻蒙HarmonyOS應用開發入門
- 大規模Linux集群架構最佳實踐:如何管理上千臺服務器
- Docker容器技術與運維
- Implementing Cloud Design Patterns for AWS(Second Edition)