官术网_书友最值得收藏!

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:

www.vmware.com/go/powercli

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:

  1. 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 or Unrestricted, by issuing any of the following commands:
    Set-ExecutionPolicy Unrestricted
    

    Or

    Set-ExecutionPolicy RemoteSigned
    
  2. Close the PowerCLI window and re-open it. You should see vSphere PowerCLI welcome screen.
  3. 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.

主站蜘蛛池模板: 南江县| 常州市| 丹巴县| 疏附县| 金寨县| 宁陕县| 左云县| 连云港市| 福清市| 确山县| 集贤县| 尤溪县| 景泰县| 冕宁县| 宜昌市| 天气| 玉林市| 大连市| 博罗县| 闻喜县| 赤水市| 金湖县| 察雅县| 宜黄县| 秦安县| 宣化县| 丹棱县| 盐边县| 荃湾区| 高邮市| 烟台市| 望城县| 囊谦县| 卓资县| 饶阳县| 松江区| 上饶市| 枞阳县| 新密市| 仪陇县| 唐河县|