Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- remove-item E:Update* -Recurse
- #Proxy auth
- $Username="daril.aleman"
- $Password="MyPassword"
- $WebProxy = New-Object
- System.Net.WebProxy("http://proxy.example.com:3128",$true)
- $url="The.url.of.download.com/file.zip"
- $client = new-object System.Net.WebClient
- $client.Proxy=$Webproxy
- $client.proxy.Credentials = New-Object
- System.Net.NetworkCredential($Username, $Password)
- $client.DownloadFile($url, "E:UpdateDaily_Update.zip")
- Set-Location E:Update
- $Unzip = New-Object -ComObject Shell.Application
- $FileName = "Daily_Update.zip"
- $ZipFile = $Unzip.NameSpace((Get-Location).Path + "$FileName")
- $Destination = $Unzip.namespace((Get-Location).Path)
- $Destination.Copyhere($ZipFile.items())
Add Comment
Please, Sign In to add comment