Now that was a very very very good post from Robert. You can check this post and his blog at
http://rvdnieuwendijk.com/2011/07/21/how-to-run-vmware-vsphere-cli-perl-scripts-from-powercli/
Once you create this function ‘Add-vCLIfunction’ and run it, you can easly run ‘functions’ from vSphere CLI. This is very very very useful.
All of those perl scripts from vsphere cli will become available for us like a function. Well we can just now simply type ‘vifs’ and bam! One thing worth mentioning here, it does not do the ‘powercli’ ‘powershell’ style output 😉 don’t forget about this, this is not an object. Basically we are still executing perl scripts, so the output is just simple text. But still you receive functions from vSphere CLI.
$a=vicfg-nics -l –server myHost1
$a|get-member -> string[]
Quick example:
I want to download quickly hostd.log from esx box
vifs –server myHost.Local -g /host/hostd.log c:\hostd.log
All sorts of things using vifs:
http://blogs.vmware.com/vsphere/2012/06/using-vclis-vifs-for-more-than-just-datastore-file-management-.html#more
