Skip to content

Instantly share code, notes, and snippets.

@Himura2la
Last active November 10, 2021 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Himura2la/e014ebf9f84e00012a4231af8435c953 to your computer and use it in GitHub Desktop.
Save Himura2la/e014ebf9f84e00012a4231af8435c953 to your computer and use it in GitHub Desktop.
Run PowerShell scripts
@if "%~1" == "" (
@echo Drop a *.ps1 file onto this script.
) else (
@echo --- launching %~1 ---
@powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~1'; echo ""--- %~1 returned $LastExitCode ---"""
)
@pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment