Created
August 14, 2013 11:37
-
-
Save hapylestat/6230267 to your computer and use it in GitHub Desktop.
Variation of executing powershell scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Via stdin | |
type "%~dp0<my_script>.ps1" | powershell.exe -command - | |
2. Default way | |
powershell.exe -File "%~dp0<my_script>.ps1" | |
3. Avoid system security setting | |
powershell.exe -ExecutionPolicy Unrestricted -File "%~dp0<my_script>.ps1" | |
3. ps script with WPF forms | |
powershell.exe -ExecutionPolicy Unrestricted -File "%~dp0<my_script>.ps1" -sta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment