How to run a Powershell script from the command line and pass a directory as a parameter February 28, 2023 by Tarik try this: powershell "C:\Dummy Directory 1\Foo.ps1 'C:\Dummy Directory 2\File.txt'"