Running Drush Launcher on Windows When I run Drush in the command line on my Windows 10 computer or Windows Server 2016 servers, I get the following error:

drush : The term 'drush' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ drush
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (drush:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


I've downloaded drush launcher and made sure that it was located in my PATH. Why is this error message showing and how do I get passed it?
The error message occurs because the command must be drush.phar and prefaced by the php command. In the same folder as Drush Launcher, you'd have to run php drush.phar to get it to work. Elsewhere, you'd have to run php /path/to/drush.phar (which can be just as, if not more, annoying that vendor/bin/drush).

To get it to work, create a folder called drush.bat in the same folder as drush.phar and include the following two lines of code:

@echo off
php %~dp0\drush.phar %*


This file is executed by the command drush since it is in your PATH and will then execute the proper php command passing the correct parameters. You'll then be able to run drush from anywhere on your computer.