Submit a ticketCall us

AnnouncementsAre You “Flying Blind?”

When it comes to your complex IT infrastructure, you want to ensure you have a good grasp of what’s going on to avoid any fire drills that result from guesswork. Read our white paper to learn how proactively monitoring your IT environment can help your organization while giving you peace of mind.

Get your free white paper.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > Execute a VMWare PowerShell script from an advanced alert

Execute a VMWare PowerShell script from an advanced alert

Updated November 23rd, 2016

Overview

This article provides brief information and steps to resolve the issue when executing a VMWare PowerShell script from an Advanced Alert. The script will run in a command line but is not fired from the alert.

For example, you are using the Domain Admin account with the correct Log on as a service.
 

Environment

All SAM versions

Resolution

Create a VBscript wrapper for your PowerShell code.

  1. Save the VBscript wrapper on the SAM Server.
  2. Modify the first line of the VBscript wrapper (by changing the extension from .vbs to .txt) and insert the full path to your Powershell script (for example, fileName = "c:\tmp\myPowerShellScript.ps1")
  3. In Manage Advanced Alerts, modify your alert and add the trigger condition, Execute VB Script.
  4. Set the correct path to the file.
  5. Make sure that Alerting Engine Service is running under the privileged user so it is able to access and execute the VBscript wrapper and your PowerShell script. If it is not, change the user for this service to a privileged user.

 

Last modified

Tags

Classifications

Public