Amazing connection, powercli + vsphere cli

by Grzegorz Kulikowski

Now that was a very very very good post from Robert. You can check this post and his blog at
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:

You may also like

1 comment

Ankit V. June 16, 2016 - 11:50 am

Thanks for sharing a Good trick, But whenever I use perl script under power shell It keeps on executing. It should execute once only!! Your help will be appreciated.


Leave a Reply

Chinese (Simplified)EnglishFrenchGermanHindiPolishSpanish