Windows 10

How to Run PowerShell Script From A Batch File

In this tutorial, we are going to see how to run a PowerShell script from a batch file using PowerShell command. The batch file contains a series of DOS (Disk Operating System) instructions. It allows triggering the execution of commands found in this file.
 

How to Run PowerShell Script From A Batch File

The following example run the PowerShell script “c:\path\to\your\powershell/script.ps1”:

Powershell.exe -executionpolicy remotesigned -File  c:\path\to\your\powershell/script.ps1

Don’t forget the parameter -executionpolicy to execute the script.
 

Leave a Reply

Your email address will not be published. Required fields are marked *