Ad Widget

Collapse

winget is not recognized

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blackdragon
    Member
    • Jan 2025
    • 46

    #1

    winget is not recognized

    I'm creating a new item for Windows Server to check app updates. The code works perfectly in PowerShell, but it is not recognized in Zabbix

    winget : The term 'winget' is not recognized as the name of a cmdlet, function, script file, or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At C:\path\Winget\ApplicationUpdates.ps1:2 char:12
    + $updates = winget upgrade
    + ~~~~~~
    + CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    1

    How to fix this?
  • Blackdragon
    Member
    • Jan 2025
    • 46

    #2
    anyone have faced the same issue ?

    Comment

    • bbonno
      Junior Member
      • Apr 2025
      • 22

      #3
      This sounds like you have to preface your command with 'powershell.exe'.

      I don't quite remember which shell Zabbix uses by default, but that error reads like it the 'wrong' one for you. Instead of running Winget directly you should be able to start powershell, and have that run Winget.

      Comment

      Working...