Skip to content

Instantly share code, notes, and snippets.

@dragon788
Created April 13, 2017 15:08
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 dragon788/b872e3fc5daf7bc680b7dd701a48e6e5 to your computer and use it in GitHub Desktop.
Save dragon788/b872e3fc5daf7bc680b7dd701a48e6e5 to your computer and use it in GitHub Desktop.
Invoke Expression against web script AND pass in arguments
$scriptPath = ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/AndrewSav/c4fb71ae1b379901ad90/raw/23f2d8d5fb8c9c50342ac431cc0360ce44465308/SO33205298'))
Invoke-Command -ScriptBlock ([scriptblock]::Create($scriptPath)) -ArgumentList "coucou"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment