Ad Widget

Collapse

Powershell Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrco88
    Junior Member
    • Jun 2017
    • 4

    #1

    Powershell Script

    Hi there,

    I have a Powershell script that I want to execute on Clients. In the zabbix agent Config I added, the User Parameter:
    Code:
    UserParameter=script.item,powershell.exe -NoProfile -ExecutionPolicy bypass -File "C:\Program Files\zabbix\script.ps1" $1
    So it works fine, but I aks following. Will the script run anyways or just then, when I connect the Item "script.item" to a client?

    Is anyone here, who know's that?

    Thanks a lot
  • tcilmo
    Senior Member
    • Nov 2016
    • 122

    #2
    Originally posted by mrco88
    Hi there,

    I have a Powershell script that I want to execute on Clients. In the zabbix agent Config I added, the User Parameter:
    Code:
    UserParameter=script.item,powershell.exe -NoProfile -ExecutionPolicy bypass -File "C:\Program Files\zabbix\script.ps1" $1
    So it works fine, but I aks following. Will the script run anyways or just then, when I connect the Item "script.item" to a client?

    Is anyone here, who know's that?

    Thanks a lot
    In order for the User Parameter to execute - an item has to be defined to call it.

    Comment

    • mrco88
      Junior Member
      • Jun 2017
      • 4

      #3
      Oke, thanks.
      Just to understand, if the item has an intervall of 60sec. The script will run every 60 sec. If I have no Item, the script doesn't run?

      Comment

      • tcilmo
        Senior Member
        • Nov 2016
        • 122

        #4
        Originally posted by mrco88
        Oke, thanks.
        Just to understand, if the item has an intervall of 60sec. The script will run every 60 sec. If I have no Item, the script doesn't run?
        Yep. Correct.

        Comment

        Working...