-
-
Save pa-0/5c6ae05c04078b5f55d8c3323cd1117a to your computer and use it in GitHub Desktop.
Download Build 2012 Videos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from http://lostechies.com/erichexter/2012/11/02/download-all-the-build-videos-while-you-sleep/ | |
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
#Set the username for windows auth proxy | |
$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2012/RSS/wmvhigh")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $url.Segments[-1] | |
$file | |
if (!(test-path $file)) | |
{ | |
$wc = (New-Object System.Net.WebClient) | |
#Set the username for windows auth proxy | |
$wc.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials | |
$wc.DownloadFile($url, $file) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment