title: GitLab-CI: sonar-scanner : The term 'sonar-scanner' is not recognized as the name of a cmdlet, function,
body: <p>I'm trying to add SonarQube to a local instance of GitLab-CI, but can't get past this error produced by GitLab-CI Runner:</p>
  <p>Note: GitLab-Runner, Sonar-Scanner and SonarQube are all installed on the same Windows server.</p>
  <p><a href="https://i.stack.imgur.com/HEXrE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HEXrE.png" alt="enter image description here" /></a></p>
  <p>My first thought was, it can't find the runner, installation/permission problem. So....</p>
  <p>I have verified:</p>
  <ul>
  <li>SonarQube Service run as Admin and has full access to Sonar-Scanner directory</li>
  <li>GitLab Runner Service as Admin and has full access to Sonar-Scanner directory</li>
  <li>Sonar-Scanner Installation double checked (Standalone executable: sonarscanner-for-msbuild) (installed per <a href="https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/" rel="nofollow noreferrer">https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/</a> )</li>
  <li>Sonar-Scanner added to Environment Variables' 'Path':</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/Q0WLQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q0WLQ.png" alt="enter image description here" /></a></p>
  <p>And still the same error so I tried running Sonar-Scanner on its own:</p>
  <p><a href="https://i.stack.imgur.com/e5XEv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e5XEv.png" alt="enter image description here" /></a></p>
  <p>and that seems to run ok. But GitLab still produces the same issue. Maybe I'm using the wrong Sonar-Scanner?</p>
  <p>I'm fairly new to GitLab-CI's Runner so any guidance/suggestions you can offer is greatly appreciated. Not sure where else to look (I've read everything/anything remotely related).</p>