Submit a ticketCall us

Get a crash course on Network Monitoring delivered right to your inbox
This free 7-day email course provides a primer to the philosophy, theory, and fundamental concepts involved in IT monitoring. Lessons will explain not only how to perform various monitoring tasks, but why and when you should use them. Sign up now.

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

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
15:54, 23 Nov 2016

Tags

Classifications

Public