Submit a ticketCall us

Have You Auto Renewed? If not, you're missing out.
The SolarWinds Renewal Program comes with a host of benefits including the most recent product updates, 24/7 technical support, virtual instructor-led training and more. Experience all of this with the convenience of Auto Renewal, and never worry about missing any of these great benefits. Learn More.

Home > Success Center > Server & Application Monitor (SAM) > 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