Download Channel 9 Series

It’s learning season again, and I’m gearing up for lots of Azure this year. Between BuildIgnite, the Microsoft Virtual Academy and the endless stream of content on Channel 9, it’s easy to feel overwhelmed!

Since bandwidth is a precious commodity, and that I don’t always have the luxury of having an access point, I decided to re-purpose the script I used to download the Build and Ignite sessions. This new script has only one reason to be; it exists to download Series from Channel 9 so that I can watch them on the go.

Going through the list of Series, I was amazed by the amount of new content. I found MVA sessions and a bunch of other interesting topics related to Azure.

Feel free to use the comments section at the bottom of this post to suggest feeds that I should pay attention to.

The Script

To execute this script, I used Windows Powershell ISE and I manually download the Series that interest me. Browse through the series that I identified for myself. Who knows, you may find something of interest.

function Get-Media
{
    [CmdletBinding()]
    param
    (
        [Object]
        $url,
        [Object]
        $title,
        [Object]
        $path
    )

    $u = New-Object System.Uri($url)
    $name = $title
    $extension = [System.IO.Path]::GetExtension($u.Segments[-1])
    $fileName = $name + $extension

    $fileName = $fileName -replace "’", ''
    $fileName = $fileName -replace "\?", ''
    $fileName = $fileName -replace ":", ''
    $fileName = $fileName -replace '/', ''
    $fileName = $fileName -replace ",", ''
    $fileName = $fileName -replace '"', ''

    $fileName

    if (Test-Path($fileName)) {
        Write-Host 'Skipping file, already downloaded' -ForegroundColor Yellow
    }
    else
    {
        Invoke-WebRequest $url -OutFile (Join-Path -Path $path -ChildPath $fileName)
    }
}

function Get-VideosFromFeed
{
    [CmdletBinding()]
    param
    (
        [Object]
        $feedUrl,
        [Object]
        $folder,
        [Object]
        $path
    )

    $feed=[xml](New-Object System.Net.WebClient).DownloadString($feedUrl)

    $downloadPath = (Join-Path -Path $path -ChildPath $folder)

    if (Test-Path($downloadPath)) {
        Write-Host 'Skipping folder, already exists' -ForegroundColor Yellow
    }
    else
    {
        New-Item -Path $downloadPath -ItemType directory -WarningAction SilentlyContinue
    }

    foreach($i in $feed.rss.channel.item) {
        foreach($m in $i.group){
            foreach($u in $m.content `
                    | Where-Object { `
                            $_.url -like '*mid.mp4' `
                         } | Select-Object -Property @{Name='url'; Expression = {$_.url}}, `
                                                     @{Name='title'; Expression = {$i.title}})
            {
                Get-Media -url $u.url -title $u.title -path $downloadPath
            }
        }
    }
}

$physicalPath = "V:\Videos\Series"

# Windows 10 development for absolute beginners 
Get-VideosFromFeed -feedUrl 'https://channel9.msdn.com/Series/Windows-10-development-for-absolute-beginners/feed/mp4' -path $physicalPath -folder 'Windows 10 development for absolute beginners'

# Microsoft Datacenter vNext Preview: Bringing Azure to Your Datacenter
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Microsoft-Datacenter-vNext-Preview-Bringing-Azure-to-Your-Datacenter/RSS' -path $physicalPath -folder 'Data Center Preview'

# Microsoft Azure Fundamentals: Virtual Machines
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Microsoft-Azure-Fundamentals-Virtual-Machines/RSS' -path $physicalPath -folder 'Microsoft Azure Fundamentals Virtual Machines'

# Adding Microsoft Azure Search to Your Websites and Apps
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Adding-Microsoft-Azure-Search-to-Your-Websites-and-Apps/RSS' -path $physicalPath -folder 'Working with Azure Search'

# Docker for .NET Developers
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Docker-for-NET-Developers/RSS' -path $physicalPath -folder 'Docker for NET Devs'

# Storage Spaces Deep Dive
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Storage-Spaces-Deep-Dive/RSS' -path $physicalPath -folder 'Storage Spaces Deep Dive'

# Cloud DevCamp
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Cloud-DevCamp/RSS' -path $physicalPath -folder 'Cloud DevCamp'

# Microsoft Azure Back End for Gaming
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Microsoft-Azure-Back-End-for-Gaming/RSS' -path $physicalPath -folder 'Microsoft Azure Back End for Gaming'

# Azure App Service
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Windows-Azure-Web-Sites-Tutorials/RSS' -path $physicalPath -folder 'Azure App Service'

# Developing Solutions with Azure DocumentDB
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Developing-Solutions-with-Azure-DocumentDB/RSS' -path $physicalPath -folder 'Developing Solutions with Azure DocumentDB'

# Big Data Analytics with HDInsight
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Big-Data-Analytics-with-HDInsight/RSS' -path $physicalPath -folder 'Big Data Analytics with HDInsight'

# Microsoft Hybrid Cloud Best Practices for IT Pros
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Microsoft-Hybrid-Cloud-Best-Practices-for-IT-Pros/RSS' -path $physicalPath -folder 'Microsoft Hybrid Cloud Best Practices for IT Pros'

# Java on Microsoft Azure
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Java-on-Microsoft-Azure/RSS' -path $physicalPath -folder 'Java on Microsoft Azure'

# Azure Active Directory Core Skills
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Azure-Active-Directory-Core-Skills/RSS' -path $physicalPath -folder 'Azure Active Directory Core Skills'

# Managing Linux Workloads in Windows Server and System Center
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Managing-Linux-Workloads-in-Windows-Server-and-System-Center/RSS' -path $physicalPath -folder 'Managing Linux Workloads in Windows Server and System Center'

# All About Microsoft Azure Operational Insights
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/All-About-Microsoft-Azure-Operational-Insights/RSS' -path $physicalPath -folder 'All About Microsoft Azure Operational Insights'

# You ve Got Key Values! A Redis Jump Start
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Youve-Got-Key-Values-A-Redis-Jump-Start/RSS' -path $physicalPath -folder 'You ve Got Key Values! A Redis Jump Start'

# Azure Solution Training
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Azure-Solutions-Training/RSS' -path $physicalPath -folder 'Azure Solution Training'

# Advanced PowerShell Desired State Configuration (DSC) and Custom Resources
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Advanced-PowerShell-Desired-State-Configuration-DSC-and-Custom-Resources/RSS' -path $physicalPath -folder 'Advanced PowerShell Desired State Configuration (DSC) and Custom Resources'

# Getting Started with PowerShell Desired State Configuration (DSC)
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Getting-Started-with-PowerShell-Desired-State-Configuration-DSC/RSS' -path $physicalPath -folder 'Getting Started with PowerShell Desired State Configuration (DSC)'

# Polyglot Persistence: Choosing the Right Azure Storage Mix
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Polyglot-Persistence-Choosing-the-Right-Azure-Storage-Mix/RSS' -path $physicalPath -folder 'Polyglot Persistence Choosing the Right Azure Storage Mix'

# Getting Started with Microsoft Azure Active Directory
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Getting-Started-with-Microsoft-Azure-Active-Directory/RSS' -path $physicalPath -folder 'Getting Started with Microsoft Azure Active Directory'

# MEAN Stack Jump Start
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/MEAN-Stack-Jump-Start/RSS' -path $physicalPath -folder 'MEAN Stack Jump Start'

# Managing Your Systems on Microsoft Azure with Chef
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Managing-Your-Systems-on-Microsoft-Azure-with-Chef/RSS' -path $physicalPath -folder 'Managing Your Systems on Microsoft Azure with Chef'

# Connect(On Demand);
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/ConnectOn-Demand/RSS' -path $physicalPath -folder 'Connect(On Demand)'

# Partner Profitability: Cloud Transformation Series
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Partner-Profitability-Cloud-Transformation-Series/RSS' -path $physicalPath -folder 'Partner Profitability Cloud Transformation Series'

# Web API Design
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Web-API-Design/RSS' -path $physicalPath -folder 'Web API Design'

# Developing Microsoft SQL Server Databases
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Developing-Microsoft-SQL-Server-Databases/RSS' -path $physicalPath -folder 'Developing Microsoft SQL Server Databases'

# Monitor Workloads with System Center Operations Manager
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Monitor-Workloads-with-System-Center-Operations-Manager/RSS' -path $physicalPath -folder 'Monitor Workloads with System Center Operations Manager'

# Azure HDInsight Service
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Getting-started-with-Windows-Azure-HDInsight-Service/RSS' -path $physicalPath -folder 'Azure HDInsight Service'

# Automate Workloads with System Center Orchestrator
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Automate-Workloads-with-System-Center-Orchestrator/RSS' -path $physicalPath -folder 'Automate Workloads with System Center Orchestrator'

# Open Source for DevOps Practices
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Open-Source-for-DevOps-Practices/RSS' -path $physicalPath -folder 'Open Source for DevOps Practices'

# Developing Microsoft Azure Solutions
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Developing-Microsoft-Azure-Solutions/RSS' -path $physicalPath -folder 'Developing Microsoft Azure Solutions'

# Architecting Microsoft Azure Solutions
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Architecting-Microsoft-Azure-Solutions/RSS' -path $physicalPath -folder 'Architecting Microsoft Azure Solutions'

# Getting Great Performance out of Azure
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Getting-Great-Performance-out-of-Azure/RSS' -path $physicalPath -folder 'Getting Great Performance out of Azure'

# Azure Networking Fundamentals for IT Pros
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Azure-Networking-Fundamentals-for-IT-Pros/RSS' -path $physicalPath -folder 'Azure Networking Fundamentals for IT Pros'

# PHP for Azure
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/PHP-for-Azure/RSS' -path $physicalPath -folder 'PHP for Azure'

# You ve Got Documents! A MongoDB Jump Start
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Youve-Got-Documents-A-MongoDB-Jump-Start/RSS' -path $physicalPath -folder 'You ve Got Documents - A MongoDB Jump Start'

# Designing Solutions for SQL Server
Get-VideosFromFeed -feedUrl 'http://channel9.msdn.com/Series/Designing-Solutions-for-SQL-Server/RSS' -path $physicalPath -folder 'Designing Solutions for SQL Server'

One response to Download Channel 9 Series using PowerShell

  1. 

    Thanks for that. I will try it. :)

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.