SIEM, Log Management, Server Monitoring, Compliance and Auditing Software
Table of Contents

PowerShell Template

The PowerShell Template enables you to execute PowerShell commands and scripts then optionally respond to results or generate a report. This template is typically used to execute custom functionality or query the operating system for information, for example, all local accounts that have not logged in within the last 90 days.

How to Get a List of Inactive Local Windows Accounts Tutorial on youtube

AlertThis template requires the Agent be installed on all managed hosts excluding the localhost.

In this Topic

To create a PowerShell Template

  • From the Menu Bar, select File | New. The Create New Object View displays.
  • From the Create New Object View, expand Templates | Windows Monitors then select PowerShell Monitor. The New Template Properties View displays.
  • The Template Properties view contains 4 tabs.

The Options Tab

  • Use the Windows server or workstation drop-down to select any Windows host you would like to monitor.
    InformationTo configure PowerShell Templates on remotely managed systems, the Agent must be installed on the remote host and configured to remain connected. For more information see Host Agent Properties.
    InformationOnce selected, the host is automatically assigned to this template.
  • Use the Type drop-down to select to either run an individual Command or Script.

To create a PowerShell Command Template

  • From the Type drop-down, Command.
  • Use the Module drop-down to select from the list of available modules. Click the help button to view Microsoft's corresponding PowerShell documentation.
  • Use the Command drop-down to select from the list of available module commands. Click the help button to view Microsoft's corresponding PowerShell documentation.
  • Use the Parameters drop-down to set the command's parameter values.
    AlertUse variable placeholders, keys wrapped with curly brackets {KEY}, to replace with extracted values.
    For example: {c-ip} or {TARGET_ACCOUNT_NAME}
  • Use the Select textbox to specify the column values you want to view. If you are unsure, specify * to view all column values.
  • Use the Execute Execute PowerShell script button to view the PowerShell command results.
PowerShell Command Properties
PowerShell Command Properties

To create a PowerShell Script Template

  • From the Type drop-down, Script.
  • Use the Filename drop-down to select the local script to run.
    AlertWhen managing a remote machine, the script is uploaded to the Agent, then, executed locally on the remote machine.
  • Use the Arguments text box to specify the PowerShell command-line parameters.
    For example: -ExecutionPolicy Unrestricted
PowerShell Script Properties
PowerShell Script Properties

To monitor and report on PowerShell results

  • Click the Load Columns button to run the command or script then automatically parse the results into data table columns.
    PowerShell Result Column Properties
    PowerShell Result Column Properties
  • Use the Warning trigger and the Critical trigger controls to apply trigger criteria to each returned row.
    PowerShell Trigger Properties
    PowerShell Trigger Properties

Testing the PowerShell Template

  • Click the Test button to verify the template is configured property and the monitor executes as expected.
  • Finally, select the General Tab, then click the click the Auto-Generate Name Auto-Generate Name Button button to auto-generate a name based on the configured settings.

Related Topics

General Tab

Actions Tab

Windows Monitor Templates