Wednesday, November 12, 2008

Powershell and the VI Toolkit!

new, 12-19-08 PowerGUI VMware PowerPack has lots of great features, including the ability to manage your ESX Hosts and VMs, as well as doing bulk operations. In my opinion, PowerGUI's best feature is that as you interact with PowerGUI, it generates PowerShell code as you go. You can take this code and re-run it later or you can parameterize it and turn it into a script. This is especially great if you're not a hard-core scripter, or if you aren't very familiar with PowerShell.


VMware in PowerGUI


Powershell and the VI Toolkit! plus
Project Description
The VI Toolkit for Windows Community Extensions is a PowerShell module designed to work with the VI Toolkit for Windows (http://vmware.com/go/powershell).

Project Goals
This project aims to help make managing VMware products with PowerShell easy and really powerful. Our current VI Toolkit for Windows contains 125 cmdlets that makes life a lot easier for people who manage VMware ESX and VMware VirtualCenter. With this project we plan to build on that by providing libraries of really useful stuff based on the ideas we see in our VMware Community as well as plenty of ideas of our own

For script nodes to work you would need to either:


  • start PowerGUI as VI Client plugin, or
  • add Connect-VI-Server to your PowerShell profile, or
  • add the -Server $global:VIServer to your scripts.


Quick VI Toolkit One-liners

 Setting of advanced options with the VI Toolkit
 Track Datastore Free Space
 VMware Stats Oneliner
 How many VMs in each LAN?
 VMware Server info
 Changing your VMware license server
  top-twenty volumes on your virtual servers with the least free disk space

Some advice on creating Powershell scripts

Some Advice on Creating Powershell Scripts (Part 2)

No comments: