I have powershell script which I am trying to execute using a batch file. I am not sure how to direct the .bat file to the powershell script without hardcoding the full path.
Both the script and .bat files are stored in the same folder. I've got this so far but it doesn't appear to do anything.
@ECHO OFF
REM PowerShell -WindowStyle Hidden -NoProfile....
SET ScriptDirectory = %~dpn0
SET ScriptPath = %ScriptDirectory% || "/" || counterscript.ps1
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%ScriptPath%'";