Skip to content

Instantly share code, notes, and snippets.

@BenMcLean
Last active October 30, 2022 22:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenMcLean/7d593af547cd168fe02a266d317d4005 to your computer and use it in GitHub Desktop.
Save BenMcLean/7d593af547cd168fe02a266d317d4005 to your computer and use it in GitHub Desktop.
Launch Powershell script .ps1 from identically named batch script .bat
@ECHO OFF
cd %~dp0
PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command "& '%~dpn0.ps1' %1 %2 %3 %4 %5 %6 %7 %8"
@PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment