Skip to content

Instantly share code, notes, and snippets.

@AshFlaw
Created January 18, 2018 19:16
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 AshFlaw/c855da99c0041d97a2b83c1d5352f728 to your computer and use it in GitHub Desktop.
Save AshFlaw/c855da99c0041d97a2b83c1d5352f728 to your computer and use it in GitHub Desktop.
Install executable with command line switches
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