Pipeline - bat command returns Windows error October 25, 2016 10:01 Follow Issue The bat command in Pipeline returns cmd is not recognized as an internal or external command, operable program or batch file. Environment Jenkins CloudBees Jenkins Enterprise Pipeline plugin Windows node/agent Resolution You need to make sure the user running the Jenkins Master/Slave where the command is executing has C:\Windows\System32 in it’s PATH variable. To add this to that user’s PATH, right click on My Computer then select Properties. Click Advanced then click Environment Variables. Scroll down to PATH and add C:\Windows\System32 to it. Reference Pipeline as Code in Jenkins Was this article helpful? 0 out of 0 found this helpful Facebook Twitter LinkedIn Google+ Have more questions? Submit a request 0 Comments Please sign in to leave a comment.