A small number of EventSentry tasks can be automated with the EventSentry PowerShell module that can be downloaded from our github here. The module is under development and new versions with additional functionality will be posted here. Suggestions for new functionality are welcome.
If you get an error message about the module not being loaded, execute:
set-executionpolicy remotesigned
The EventSentry PowerShell module should automatically, if it does not then execute:
Import-Module EventSentry
The module currently includes the following functionality. Use the Get-Help command for additional details.
Add-ESGroup
Adds a new group
Remove-ESGroup
Removes a group
Test-ESGroup
Verifies that a group exists
Set-ESGroupProperty
Customizes heartbeat monitoring settings for a given group
Get-ESHosts
Displays all hosts in a group
Add-ESHost
Adds a host to a group
Set-ESHostProperty
Customizes heartbeat monitoring settings for a given host
Remove-ESHost
Removes a host from a group
Add-ESVariable
Defines a new variable
Set-ESVariable
Sets the value of a variable for a group
Add-ESMaintenance
Adds a maintenance schedule (similar to "Maintenance Now") to a host
Set-ESAuthPasswordWindows
Updates the password of an existing authentication entry in the authentication manager
Save-ESConfig
Activates the current configuration for local services and for the collector if automatic deployment is enabled.
Download the zip file and extract all files into an EventSentry sub folder, in one of the supported modules directories. You can find out which module directories are in PowerShell's search path with the following command:
$ENV:PSModulePath
For example:
C:\Program Files\WindowsPowerShell\Modules\EventSentry
C:\Program Files\PowerShell\7\Modules\EventSentry
No other steps are necessary to install the EventSentry PowerShell module.
In most cases the module should be automatically loaded as soon as any of the included functions are called. To utilize the module, execute any of its funtions, e.g.
Get-ESHosts "Default Group"