While running ADO pipeline through Newman getting error Newman is not recognized as an internal and external command

System Variables patch has been set, still getting the error:
newman is not recognized as an internal and external command.

Can you provide screenshots\details of your ADO pipeline?

The following is an example pipeline..

You need to run your pipeline on an agent that has node installed.

Then the first task in the pipeline would be to install Newman.

npm install -g newman

Ensure the working directory is setup in the advanced options. You will need this later when publishing the results.

The next task would be to call Newman with the appropriate command line options.

For example…

newman run collection.json -e environment.json --reporters cli,junit --reporter-junit-export Results\junitReport.xml

Your final task sequence will publish the test results within the ADO Test Plans.