System.Net.WebClient: Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „== Download from URL with "System.NET.WebClient" == <source lang="powershell"> $webclient = new-object System.Net.WebClient #[System.Net.ServicePointManager]::…“)
(kein Unterschied)

Version vom 28. Juni 2018, 15:34 Uhr

Download from URL with "System.NET.WebClient"

$webclient = new-object System.Net.WebClient
#[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} #If certificate Selfsigned
$webclient.Credentials = new-object System.Net.NetworkCredential($username, $password)
$webpage = $webclient.DownloadString("<URL>")