Ad Widget

Collapse

PowerShell script being passed Macro(s) as a Parameter query ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newfads
    Junior Member
    • Nov 2021
    • 1

    #1

    PowerShell script being passed Macro(s) as a Parameter query ?

    Hi All

    Via Zabbix we are successfully running a PowerShell script on a Windows Server (via an Action Trigger; with Script and Media Type) which simply logs an entry to the Windows Application event log when a Zabbix Problem above High or Equal occurs.
    However Im also looking to pass in\across Zabbix Macros as Parameters to the PowerShell script such as {EVENT.NAME} for example. This would (hopefully) allow us to pipe in details about the Problem that we are logging within the Description field of the Windows event log entry.

    However Ive been unable to fin any examples or guidance on this scenario.
    Any help would be much appreciated? (I only have a couple weeks exprience of Zabbix so apologies if the above does not describe the scenario well or is a miss reading of the Zabbix concepts \ functinality etc)

    powershell –NoProfile –ExecutionPolicy bypass –File c:\zabbix-scripts\zabbixproblemwithmacros.ps1

    The above script is runs a simple Write-EventLog cmdlet with a single Parameter configured.

    Kind Regards
    Andrew
Working...