Great Blog

06 Dec 2020

Download file via powershell

This is extremely useful if you need to download something in Windows via CLI. This is just like wget on LInux. Previously I would use the precompiled wget program on machines, but now that I learned how to use powershell it’s great.

mkdir c:\temp
cd c:\temp
powershell.exe
Invoke-WebRequest -Uri LINKTOEXEHERE.EXE -OutFile EXENAMEHERE.EXE
rm EXENAMEHERE.EXE