2 Replies Latest reply on Oct 17, 2019 6:11 AM by ganapa2000

    Validate zero and negative numbers

    ganapa2000 Hot Shot



      I would like to validate the CPU output, the below works, if the output value is equals to zero,


      Please help, how can I validate and exit if output of variables is zero and negative.


      $TotalCPU = 100

      $UsedCPU = 150


      $cpu = $TotalCPU - $UsedCPU

      if (($cpu) -eq 0) {

          "Validation Failed"




      else {

          "Validation Success"