Here is how I could run all powershell files in the same directory as the batch file
@ECHO OFF SET PowerShellExe=%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe for %%i in (*.ps1) do ( %PowerShellExe% -NoProfile -ExecutionPolicy Bypass -Command %cd%\%%i )
source share