So I\'ve tried a bunch of different ways to run a powershell script from the command line and every single one returns an error.
Here is this path:
To add to this topic:
I needed to pass a parameter with spaces.
I am dragging and dropping a file onto a batch file, and the file is off on the server with spaces in the path and/or file name. After testing the above answers I got this to work. Note I am changing to the working directory prior to starting powershell.
Batch file:
pushd O:\Data\QuickList
start powershell -noexit -Command ".\QuickList.ps1 -datafile '%1'"
popd