How to run powershell script from .ps1 file?

Create a batch file which points at your .ps1 file. You may be required to run the batch file with elevated permissions, depending on your access levels (the logged in account will be used for execution).

E.g.:

Powershell.exe -executionpolicy remotesigned -File  "C:\Path\script.ps1"

If this still isn’t working, please execute your batch file via CMD (copying the path, wrapped in quotation marks, into CMD) and let me know the response.

Leave a Comment