IBM Support

How to run PowerCLI script as an Action Script

How To


Summary

It would be great if we could run PowerCLI scripts directly from Turbonomic as part of an action, either before or after the action is executed. In our scenario, we are using Turbonomic to manage physical hosts with a host policy that fully automates 'Start' and 'Suspend' of a physical host. This works great, except for one problem: suspending a host in our environment triggers a high priority event to our Hyper-Visor team because the host is no longer responding. What should be an easy problem to resolve with our monitoring team, i.e. creating an action script to notify BMC Patrol that the host being suspended is in fact OK and to not create a Priority-2 ServiceNow incident, turned out to be very difficult because their version of BMC Patrol doesn't support API integration. So, our options were really limited on what we could do to prevent unnecessary high priority incidents. Initially, I had thought about writing a bash script to just have Turbonomic call API's to the vCenter and put the host in maintenance mode, as opposed to having it suspended. However, I couldn't find a way to do this with vCenter API directly, but I did find a way to do it with PowerCLI. Here I will describe how I use Azure Automation with PowerCLI to accomplish this. This is a rare use case, but it might be useful for other functions that PowerCLI is capable of and hopefully will help.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSFV9Z","label":"IBM Turbonomic Application Resource Management"},"ARM Category":[{"code":"a8m3p000000PCLHAA4","label":"Public Cloud"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
11 January 2023

UID

ibm16854643