Skip to content

Instantly share code, notes, and snippets.

@darthwalsh
Created October 6, 2016 08:36
WPowerShell
CreateObject("WScript.Shell").Run "powershell.exe -nologo -file """ & WScript.Arguments.Item(0) & """" ,0
@darthwalsh
Copy link
Author

Want to run a powershell script without opening a new console window? Save wpowershell.vbs to your PATH, then invoke like this:

wpowershell C:\blah.ps1

@darthwalsh
Copy link
Author

Alternatively, use Vittel/RunHiddenConsole to compile powershellw.exe.

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