Skip to content

Instantly share code, notes, and snippets.

@jstrassburg
Last active August 29, 2015 13:56
Show Gist options
  • Save jstrassburg/9233395 to your computer and use it in GitHub Desktop.
Save jstrassburg/9233395 to your computer and use it in GitHub Desktop.
A simple proxy for launching a PowerShell script from the regular command prompt
@echo off
SET DIR=%~dp0%
@PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%MyScript.ps1' %*"
pause
@jstrassburg
Copy link
Author

I changed it to .txt from .cmd because the syntax formatting was hiding the %DIR%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment