Table of Contents
- Getting Started
- Agent-Based Management
- Data Providers
- Directory Services
- Event Log Archiving for JSIG and CMMC Compliance
- Auditing
- Hosts
- Templates
- Template Properties
- Batch Update Templates
- Assign Templates
- Log Management Templates
- SCAP Compliance Monitor
- File and Directory Monitor Templates
- Windows Monitor Templates
- Account Lockout Monitor Template
- Logon Monitor Template
- CPU Monitor Template
- Memory Monitor Template
- Disk Space Monitor Template
- SMART Monitor Template
- Process Monitor Template
- Service Monitor Template
- Performance Counter Monitor Template
- PowerShell Template
- Registry Value Monitor Template
- System Security Monitor Template
- Active Directory User Monitor Template
- Active Directory User Integrity Monitor Template
- Task Scheduler Template
- Clock Synchronization Template
- Defragment NTFS Disks Template
- Windows Audit Policy Monitor Template
- Windows Logon As Monitor Template
- Windows Update Template
- Windows Management Instrumentation (WMI) Templates
- Database Monitor Template
- Directory Service Monitor Template
- DNS Blacklist Monitor Template
- DNS Monitor Template
- Domain Expiration Monitor Template
- Network Speed Monitor Template
- Ping Monitor Template
- Database Table Reseed
- SQL Server Shrink and Backup Template
- SSH Shell
- TCP Port Scan Monitor Template
- Website Monitor Template
- Wake On LAN Template
- SSL Certificate Monitor Templates
- Email Monitor Templates
- SNMP Monitor Templates
- Windows Accounts Templates
- Monitors
- Reports
- File and Permission Reports
- Summary Reports
- Auto-Configurators
- Filters
- Actions
- Database Actions
- Desktop Actions
- Email Actions
- Event Log Actions
- Executable Actions
- File Actions
- IIS IP Address Restriction Actions
- Microsoft Teams Actions
- PowerShell Actions
- Report Actions
- Service Actions
- SMS Actions
- SNMP Trap Actions
- Syslog Actions
- Template Actions
- IIS IP Address Restriction Actions
- Action Variables
- Schedules
- Environment Variables
- Options
- Account Lockout Monitoring and Reporting
- Merging Logs
- SNMP
- SSH Shell
- Syslog
- Exporting and Importing Configuration Objects
- Shared Views
- Active Directory User and Group Filters
- Assign Actions
- Assign Azure Audit Logs
- Assign Consolidated Logs
- Assign Directories
- Assign Disks
- Assign Event Logs
- Assign Files
- Assign Services
- Assign Shares
- Auto-Config Host Assignment Properties
- Define CSV and W3C Log Entry Columns
- Define Log Entry Columns
- Define Log Entry Columns with Regular Expressions
- Executable Status
- Executable Timeline
- Explicitly Assigned Logs
- File Explorer
- General Executable Properties
- Report Columns
- Report Date/Time Ranges
- Report Security Event Log Filters
- Select Folder or File
- Target Files and Sub-Directories
- Command Line Interface
- Server Configuration
- Agent Configuration
- Troubleshooting
- Terminology
Corner Bowl Server Manager
SIEM, IPS, Server Monitoring, Uptime Monitoring and Compliance Software
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.
In this Topic
- How To Create a PowerShell Template
- How To Create a PowerShell Command Template
- How To Create a PowerShell Script Template
- How To Set the PowerShell Timeout
- How To Monitor and Report on PowerShell Results
- Testing the PowerShell Template
How 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.
- General
- Options
- Agent Template
- Actions
Important
This Template requires the Agent be installed on all managed hosts excluding the localhost. For more information see: Agent-Based Management
The Options Tab
- Use the Windows server or workstation drop-down to select any Windows host you would like to monitor.
Important
To 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.
Note
Once selected, the host is automatically assigned to this template.
- Use the Type drop-down to select to either run an individual Command or Script.
How 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.
Note
Use variable placeholders, keys wrapped with curly brackets {KEY}, to replace with extracted values.
For example: {c-ip} or {TARGET_ACCOUNT_NAME}
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 button to view the PowerShell command results.
How To Create a PowerShell Script Template
- From the Type drop-down, Script.
- Use the Filename drop-down to select the local script to run.
Important
- Use the Arguments text box to specify the PowerShell command-line parameters.
For example: -ExecutionPolicy Unrestricted
How To Set the PowerShell Timeout
- Use the Execution timeout controls to set the maximum time to wait for PowerShell to complete before triggering a timeout error.
How 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.
- Use the Warning trigger and the Critical trigger controls to apply trigger criteria to each returned row.
- Use Save results to the database to save each returned row to the Log Repository for external consumption.
- Use Hide informational results checkbox to remove all informational results from the result data table.
- Use Hide triggered results checkbox to remove all trigger results from the result data table.
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 button to auto-generate a name based on the configured settings.