i need a powershell script to download a file from a website. we normaly need to open a browser first and authenticate to a website. how can i do this through an unintended script. thanks
i have tried several versions of scripts online but no luck..
$source = "http://chocolatey.org/install.ps1" $dest = "C:\temp\chocolatey_install.ps1" $WebClient = New-Object System.Net.WebClient $WebProxy = New-Object System.Net.WebProxy("http://chocolatey.org:8080",$true) #$WebProxy.Credentials = New-Object Net.NetworkCredential("user","password","domain.local") $WebProxy.Credentials = New-Object Net.NetworkCredential("$user","$password","") $WebClient.Proxy = $WebProxy $WebClient.DownloadFile($source,$dest)