title: How to run ZAP scan in command line?
body: <p>I am running pen test on asp.net core web app using the tool OWASP ZAP. When I am running the test using the windows app of Owasp ZAP, the tests are running fine and giving results but when I am trying to run the tests using command line I am seeing this exception.</p>
  <pre><code>raise NewConnectionError(
  urllib3.exceptions.NewConnectionError: &lt;urllib3.connection.VerifiedHTTPSConnection object at 0x000001CCBD907D60&gt;: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it
  </code></pre>
  <p>Why is this happening and how to correct this?</p>
  <p>I changed the ZAP_PATH environment variable to the folder where zap.sh is located. Now I am getting a different exception:</p>
  <pre><code> raise RemoteDisconnected(&quot;Remote end closed connection without&quot;
  http.client.RemoteDisconnected: Remote end closed connection without response
  </code></pre>