1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

VSPP - vSphere Power Perl

The VSPP library is still in it's infancy. The goal is to create a simple library that provides an abstraction layer over the vSphere perl sdk that is similar to the powerCLI cmdlets.

For example, in powerCLI there is a cmdlet called Get-VM. As of 4.1 it has a syntax of :

Get-VM [-Datastore <Datastore[]>] [-Location <VIContainer[]>] [[-Name] <String[]>] [-Id <String[]>] [-NoRecursion?] [-Server <VIServer[]>] [<CommonParameters?>]

The equivalent perl function in vspp is :

GetVM( Name => 'VMName', Filter => { 'option' => 'value' } ) ; # return array of VM's who have the name 'VMName' and match option filters

or

GetVM ( Filter => { 'config.guestFullName' => qr/Windows/} ) ; # return array of VM's where the guestFullName contains the string Windows.

You can get the complete list (still small) of implemented 'cmdlets' and some samplecode showing you how to call the VSPP layer