Ad Widget

Collapse

agent2 windows: HostnameItem prefix+env ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EnricoAbaco
    Junior Member
    • Jun 2024
    • 15

    #1

    agent2 windows: HostnameItem prefix+env ?

    i need automatic assign hostname like
    prefix_hostname.domain.local

    i try
    HostnameItem=system.run[powershell.exe (([System.Net.Dns]::GetHostByName(($env:computerName))).HostName)]
    but
    cannot process configuration: cannot get system hostname using "system.run[powershell.exe (([System.Net.Dns]::GetHostByName(($env:computerName))).HostName)]" item specified by "HostnameItem" configuration parameter: Invalid item key format.

    Zabbix Server 7
    Windows 11
    Agent2
  • EnricoAbaco
    Junior Member
    • Jun 2024
    • 15

    #2
    thank's but, pwsh.exe does not exist

    Comment

    • EnricoAbaco
      Junior Member
      • Jun 2024
      • 15

      #3
      Works! Thanks

      Comment

      • rossmuron
        Junior Member
        • Aug 2025
        • 2

        #4
        the worst is when I have this same issue but the replies were deleted

        Comment

        Working...