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
PowerCLI Resources:
- http://www.vfail.net/powercli/
- Trainsignal’s PowerShell training (Sean Crookston’s affiliate link)
Use VMRun to execute commands in a guest OS
- Install VMware VIX (Windows or Linux)
- VMware Tools must be installed in Guest OS
- C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe
- http://www.vmware.com/pdf/vix160_vmrun_command.pdf
- http://www.virtuatopia.com/index.php/Controlling_VMware_Virtual_Machines_from_the_Command_Line_with_vmrun#The_Basics_and_Syntax_of_vmrun
- http://blogs.vmware.com/vix/2008/12/managing-vm-guests-using-vmrun.html
- http://www.virtuallyghetto.com/p/vmware-vix_29.html
Install vSphere PowerCLI
Both the download and documentation can be found at http://communities.vmware.com/community/vmtn/vsphere/automationtools/powercli
Install Update Manager PowerShell Library
Use basic and advanced Cmdlets to manage VMs and ESX Hosts
Use the resources above to learn more about PowerShell and PowerCLI
Use Web Service Access Cmdlets
The vSphere PowerCLI 4.1 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.