To automatically run the .ps1 script as a batch utility, Copy and paste code below and save it with a .bat file extension
cd /d %~dp0
powershell -noexit -file ".\powershellscript.ps1" "%CD%"
pause
cd /d %~dp0
powershell -noexit -file ".\powershellscript.ps1" "%CD%"
pause
No comments:
Post a Comment