Tag - Javascript

VMware vRealize Orchestrator 3 minutes
Recently I had a customer wanting to identify if a VM of theirs was in Production, Test, or Development based on the VM’s name. Luckily, all of their VMs are named using a naming standard of “{customer}{P|T|D}{application}{server-role}”, giving a generic VM name like “custpdc1” or “cust-t-sql2”. They’re just getting started on their journey with vRealize Orchestrator, and wanted to use it to perform this function. Easy enough, what do we need?
VMware vRealize Orchestrator 2 minutes
I’ve been working on some more automation lately for vCloud Director using vRealize Orchestrator. One of my use cases was to retrieve the SDK Connection scripting object for the linked vCenter Server. My starting point was an Org vDC, and from there I wanted to get the backing vCenter Server. Let’s start by getting the Provider vDC vCloud Reference object from the Org vDC scripting object (orgVDC): var providerRef = orgVDC.
VMware vRealize Orchestrator 1 minute
Last year the legendary William Lam (Virtually Ghetto) posted a handy Powershell script that can use the vSphere 6.5 API’s to send keyboard key strokes to a VM (https://www.virtuallyghetto.com/2017/09/automating-vm-keystrokes-using-the-vsphere-api-powercli.html). I recently had a need for this feature but in vRealize Orchestrator and in Javascript instead of Powershell so I’ve re-written it in Javascript. I’ve included 2 additional script blocks that you can place into Scriptable Tasks or Actions too.