Powershell' is not recognized as an internal or external command, operable program or batch file
Sounds like you're missing an environment variable.
Add this to your Path
environment variable:
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
OR
Change your script to this:
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "your command"
You only need to add it to your environment variables, just follow the following two simple steps:
1.write env in the search bar
orRight click start button -> System -> Advanced system settings -> Environment Variables... -> Select PATH
2. click on the new button and add the following path:
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
or %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
Remove BOM byte from the beginning of batch file or convert it's encoding to ANSI. BOM treats system to think you use unavailable command.