Created
January 18, 2018 19:16
-
-
Save AshFlaw/c855da99c0041d97a2b83c1d5352f728 to your computer and use it in GitHub Desktop.
Install executable with command line switches
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
Function Install-EXE | |
{ | |
Param | |
( | |
$Command | |
) | |
$processID = (Invoke-WmiMethod -class Win32_process -name Create -ArgumentList $Command -ErrorAction Stop).processid | |
Wait-Process -Id $processID | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment