VCAP-DCA Objective 8.1 : Execute VMware Cmdlets and Customize Scripts Using PowerCLI

Knowledge

  • Identify vSphere PowerCLI requirements
  • Identify Cmdlet concepts
  • Identify environment variables usage

Skills and Abilities

  • Use VMRun to execute commands in a guest OS
  • Install vSphere PowerCLI
  • Install Update Manager PowerShell Library
  • Use basic and advanced Cmdlets to manage VMs and ESX Hosts
  • Use Web Service Access Cmdlets
  • Use Datastore and Inventory Providers
  • Given a sample script, modify the script to perform a given action

Tools

  • vSphere PowerCLI Installation Guide
  • vSphere PowerCLI Administration Guide
  • Product Documentation
  • vSphere PowerCLI commands
  • vSphere PowerCLI Cmdlets

Notes

I am still learning when it comes to Powershell and have been compiling a list of resources at http://www.seancrookston.com/powercli/ as I discover them. One I found particularly useful was from virtualize planet. There is a set of guides that take you from the beginner level to someone who can play around a bit more and start utilizing Powershell to the fullest.

Additionally I highly recommend Trainsignal’s Powershell training, that comes as part of the first and second pro series.  I still have some ways to go through the advanced topics in the second part of the pro series, but have found the first part to be an amazing resource when it comes to learning how to use Powershell and then apply that learning to automate more tasks in your environment. This training is led by Powershell guru Hal Rottenberg who also has authored a book on the topic if you are not familiar.

For full disclosure the link above to the Trainsignal training is an affiliate link.

Use VMRun to execute commands in a guest OS

Install vSphere PowerCLI

Install Update Manager PowerShell Library

  • Pretty straight forward, You have two options here, standalone or as a plug-in.

Use basic and advanced Cmdlets to manage VMs and ESX Hosts

  • Refer to the links above to learn and get a grasp on Powershell. They do a great job of taking you from your basic Cmdlets all the way to more advanced options. As I mentioned above the Powershell training from Trainsignal was great as it was video led and led me to play around a bit more. The guides from Virtualizeplanet are also very good in getting you to understand the basics.

Use Web Service Access Cmdlets

  • vSphere PowerCLI Administration Guide pg 21
  • The vSphere PowerCLI 4.0 list of cmdlets includes two Web Service Access cmdlets  Get-View & Get-VIObjectByVIView

Use Datastore and Inventory Providers

  • From pg 24-26
  • The Datastore Provider (VimDatastore) is designed to provide access to the contents of one or more
    datastores. The items in a datastore are files that contain configuration, virtual disk, and the other data
    associated with a virtual machine.All file operations are case‐sensitive.

2 Responses to VCAP-DCA Objective 8.1 : Execute VMware Cmdlets and Customize Scripts Using PowerCLI

  1. Thanks for the kind words. :)

  2. Pingback: VCAP-DCA Section 8 Scripting & Automation – Follow-up

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>