
# Parametry
$Url = "http://www.windows-scripting.com"
$Cel = "c:\teched\10_PowerShell\main.htm" 

# Skrypt
Write-Host "Ładowanie " $url "..."
$html = (new-object System.Net.WebClient).DownloadString($Url)
$html | Set-Content -Path $Cel
Write-host "Strona została zapisana: " $Cel

trap [System.Exception]
 {
    write-host "Błąd ładowania: `"$url`"" `n
    exit
 }
