Create an Event with VBScript

Version 1

    DESCRIPTION

    This vbscript can be used to create an event for use within audit trails. The custom message is placed in the events table and (optionally) assigned to a node. Run it from a command prompt or within an Advanced Alert.

    REQUIREMENTS

    Make the following changes to the connection string in the script:

    • data source (currently set to "SQLServer"
    • database name (currently set to "NetPerfMon")
    • user name (currently set to "sa")
    • user password (currently set to "TOPSECRET")

    EXAMPLES

    1. Create a new event with the message "Testing the script"  Script is saved on C: drive.

    2. Add an additional event when an Alert has fired. Execute an external VB Script has been added as a trigger action for the Alert. VB Script Interpreter has been set to WScript.exe. Script is saved under C:\Scripts on server. The message is "Replace this old equipment", and it is assigned to the Node.

     

    NOTES 

    The script uses EventType 1002, a critical event. You may prefer creating your own Event type and icon. Please let me know if you spot any problems with the script, or if there is anything  left out of the description.

    NewEvent.vbs (735 bytes) Download