Skip to main content

Powershell: Use Invoke-WebRequest to Download File

Let's try using Powershell Invoke-WebRequest to download nginx version 1.52.2 and save as nginx.zip in the current folder.

Invoke-WebRequest -Uri http://nginx.org/download/nginx-1.15.2.zip -OutFile nginx.zip

iwr, curl, and wget are alias of Invoke-WebRequest.

Popular posts from this blog

chisel: Notes

Export All Group Policy Objects

PS C:\Users\Administrator> Import-Module GroupPolicy PS C:\Users\Administrator> $today = Get-Date -F yyyyMMdd PS C:\Users\Administrator> $domain = "practicehabits.net" PS C:\Users\Administrator> Get-GPOReport -All -ReportType XML -Domain $domain -Path C:\Audit\GPOReportsAll-$today.xml PS C:\Users\Administrator> Get-GPOReport -All -ReportType HTML -Domain $domain -Path C:\Audit\GPOReportsAll-$today.html