Book Image

PowerCLI Cookbook

By : Philip Brandon Sellers
Book Image

PowerCLI Cookbook

By: Philip Brandon Sellers

Overview of this book

Table of Contents (19 chapters)
PowerCLI Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Connecting to a vCloud environment


Before you can do any work in a vCloud environment, you need to connect to it. Connecting to vCloud Director or to a vCloud Hybrid Service Provider looks very similar to connecting to vCenter or an ESXi host.

Getting ready

The cmdlet to connect to vCloud is essentially the same as the Connect-VIServer cmdlet used to connect to vCenter or an individual ESXi host. Instead of the VI acronym, the cmdlets for vCloud Director use CI. So, the cmdlet to connect to vCloud is Connect-CIServer.

How to do it…

In order to connect to a vCloud environment, perform the following steps:

  1. The first step is to connect using the Connect-CIServer cmdlet. Try using it just like a Connect-VIServer cmdlet:

    Connect-CiServer vcloud.lab.local
    

    If the certificate used to install vCloud Director is not trusted, you will be prompted with a message about an invalid certificate, as shown in the following screenshot:

  2. You can choose to accept the certificate either one time or permanently. However...