[Solved] Download and run files using PowerShell [closed]


To answer part of your question:

Using Invoke-WebRequest you can feed it a url and use the parameter -OutFile to send it somewhere locally on your machine, example:

$url = example.com/somefile.jpg
Invoke-WebRequest $url -OutFile C:\output\somefile.jpg

This will download the somefile.jpg from example.com and save it in C:\output\ on your machine

https://msdn.microsoft.com/powershell/reference/5.1/Microsoft.PowerShell.Utility/Invoke-WebRequest

7

solved Download and run files using PowerShell [closed]