VMware Explore happening NOW!

Using PowerCLI, Onyx and Orchestrator

Yes! You can! I’m not talking about using vCO to call PowerCLI scripts. As well, that’s been covered before. What I’m talking about is using PowerCLI against VMware Onyx to get vCO JavaScript (Jeorg Lew’s post on it here).

First, get Onyx. I’ll wait… Have it? Excellent. Now fire it up & change the output mode to vCO JavaScript:

image

Next, open a new connection and select PowerCLI as the client:

image

Once connected, run some of your PowerCLI commands. The example below is from running “Set-KeyDelay.ps1” script from a while ago. Output from Onyx below:

// ——- ReconfigVM_Task ——-

var spec = new VcVirtualMachineConfigSpec();
spec.extraConfig = System.getModule(“com.vmware.onyx”).array(VcOptionValue, 1);
spec.extraConfig[0] = new VcOptionValue();
spec.extraConfig[0].key = “keyboard.typematicMinDelay”;
spec.extraConfig[0].value = 2000000;

managedObject.reconfigVM_Task(spec);  // VirtualMachine

image

4 thoughts on “Using PowerCLI, Onyx and Orchestrator

  • Nice but you forgot to mention you need to install the Onyx package (needed to use the com.vmware.onyx actions). Alternatively you can replace the action by native code (this is what I did when using onyx).

  • Downloading Onyx is not enough to make it work: you need to install the Onyx package in vCO.
    If you do not install this package you can modify the code Onyx generates (in your example the second line).

  • Hello – the link to the vmwareadmins page “vCO to call PowerCLI scripts” is not working, is there a correct link please?

Comments are closed.