18.08.2013 Views

vSphere SDK for Perl Programming Guide - Documentation - VMware

vSphere SDK for Perl Programming Guide - Documentation - VMware

vSphere SDK for Perl Programming Guide - Documentation - VMware

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Hello Host: Running Your First Script<br />

Be<strong>for</strong>e you run your first script, you need the following:<br />

Chapter 1 Getting Started with <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong><br />

Successful <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> installation. See the <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Installation <strong>Guide</strong> <strong>for</strong> in<strong>for</strong>mation.<br />

Access to one of the supported <strong>vSphere</strong> hosts. Per<strong>for</strong>m a connection check using the process described in<br />

“Use the Managed Object Browser to Explore Server‐Side Objects” on page 24.<br />

To run the connect.pl script<br />

1 At a command prompt, change to the /apps/general directory.<br />

C:\Program Files\<strong>VMware</strong>\<strong>VMware</strong> <strong>vSphere</strong> CLI\<strong>Perl</strong>\apps\general<br />

/usr/lib/vmware-vcli/apps<br />

2 Run connect.pl as follows:<br />

connect.pl --url https://:/sdk/vimService --username myuser --password mypassword<br />

The script returns an in<strong>for</strong>mation message and the host time.<br />

You are now ready to run other scripts, or create new scripts.<br />

NOTE You can run any utility application with --help to display in<strong>for</strong>mation about its parameters.<br />

<strong>VMware</strong>, Inc. 17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!