VMware Cloud Community
BarryCoombs
Contributor
Contributor
Jump to solution

Couple of CLI commands, is there a Power CLI alternative?

Hi,

We have some PowerCLI build scripts that I have created for building vSphere enviroments, two of the only elements I havent been able to automate are as follows

enable CDP on the vSwitches

Currently we use the following command from the CLI

esxcfg-vswitch -B both vSwitch?

Teaming the VMK's with the iSCSI HBA from the CLI

esxcli swiscsi nic add -n vmk? vmhba??

Am I able to complete these two steps with PowerCLI and if not will I be able to do it with vSphere 5 and PowerCLI 5?

Cheers

Barry

www.virtualisedreality.com | www.twitter.com/virtualisedreal
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Afaik there are no public API to perform these functions.

But you can use Robert's vCLI wrapper and call the commands from your PS script.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Afaik there are no public API to perform these functions.

But you can use Robert's vCLI wrapper and call the commands from your PS script.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
BarryCoombs
Contributor
Contributor
Jump to solution

Cheers Luc  I will take a look

www.virtualisedreality.com | www.twitter.com/virtualisedreal
0 Kudos
alanrenouf
VMware Employee
VMware Employee
Jump to solution

Have you also tried Get-ESXCLI for the second one ?

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
0 Kudos