GitLab-CI: sonar-scanner : The term 'sonar-scanner' is not recognized as the name of a cmdlet, function,

My issue was related to environment path. I have multiple accounts.

  • GitLab Runner Service as Admin and has full access to Sonar-Scanner directory

The account that GitLab runner was using was not not the account that had the environment variables. Once SonarScanner directory was added to the user environment variables (Path) of the GitLab runner windows account, it worked as expected, although the scanner ran, analysis is not showing up in sonar scanner.