Script to execute Powershell using batch file where the location of the script is not hard coded.

@echo off
SET var=%cd%

powershell.exe -ExecutionPolicy Bypass -Command "& '%cd%\PowershellFile.ps1'"

Categorized in:

Powershell, Batch,

Last Update: May 17, 2024