15 49.0138 8.38624 1 0 4000 1 https://vladtalkstech.com 300 1
theme-sticky-logo-alt

The Ultimate Script to download Microsoft Ignite 2016 Videos AND slides!

5 Comments

With the amount of great sessions at Ignite this year, there is no way you could have attended all, and even if they are posted on Channel9 and Youtube, you might want to download them to be able to view them offline! That is why I created this PowerShell Script so everyone can easily download Microsoft Ignite Videos AND slides whether they were present at Ignite or not! Here are the features:

  • Downloads all the Microsoft Ignite 2016 Sessions and Slides and description in a text file
  • Groups them by folders
  • Makes sure no errors come up due to Illegal File names.
  • If you stop the script and restart in the middle, it will start where it left off and not from beginning
  • Filter by keywords in the session title!
  • Ability to choose from HD videos, or lower quality.

 

How to use:

First, make sure to change the $downloadlocation variable. By default it saves it all in C:\Ignite

  • To download all sessions just run the script! (1TB of content in High Definition) EX:

.\ DownloadIgnite2016Content

  • To download sessions based on a keyword use the keyword parameters, and divide keywords by a comma. Make sure to use quotes around the keywords! EX:

.\ DownloadIgnite2016Content -keyword “Groups,PowerApps,Flow”

  • To download sessions based on the session code, use the session parameter and divide sessions by a comma. Make sure to use quotes around the session codes!

.\DownloadIgnite2016Content -session “BRK3038,BRK3080,BRK1009”

Note: By default, the videos are downloaded in High Definition. Downloading all the Ignite Videos in HD takes over 1TB of hard drive space. You can change the script (delete two lines, and uncomment two others) in order to download the lower quality version of the videos, which is only about 80 GB.

Follow me on Social Media and Share this cool script with your friends!

Leave a comment and don’t forget to like the Absolute SharePoint Blog Page   on Facebook and to follow me on Twitter here  for the latest news and technical articles on SharePoint.  I am also a Pluralsight author, and you can view all the courses I created on my author page.

Download the script from here!  Do not copy paste from below as it sometimes messes up the PowerShell code!

Here is the source code:

#Script written by Vlad Catrinescu
#Visit my site www.absolute-sharepoint.com
#Twitter: @vladcatrinescu
#Originally Posted here: https://vladtalkstech.com/2016/10/the-ultimate-script-to-download-microsoft-ignite-2016-videos-and-slides

Param(
  [string]$keyword,[string]$session
)


######    Variables  #####

#Location - Preferably enter something not too long to not have filename problems! cut and paste them afterwards
$downloadlocation = "C:\Ignite"
#Ignite 2016 Videos RSS Feed
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath 
$rss = (new-object net.webclient)
$video1 = ($rss.downloadstring("http://s.ch9.ms/events/ignite/2016/rss/mp4high"))
$video2 = ($rss.downloadstring("http://s.ch9.ms/events/ignite/2016/rss/mp4high?page=2")) 
#other qualities for the videos only. Uncomment below and delete the two previous lines to download Mid Quality videos
#$video1 = ($rss.downloadstring("http://s.ch9.ms/events/ignite/2016/rss/mp4"))
#$video2 = ($rss.downloadstring("http://s.ch9.ms/events/ignite/2016/rss/mp4?page=2"))
$slide1 = ($rss.downloadstring("http://s.ch9.ms/events/ignite/2016/rss/slides"))
$slide2 = ($rss.downloadstring("http://s.ch9.ms/events/ignite/2016/rss/slides?page=2"))



#SCRIPT/ Functions  Do not touch below this line :)#
if (-not (Test-Path $downloadlocation)) { 
		Write-Host "Folder $fpath dosen't exist. Creating it..."  
		New-Item $downloadlocation -type directory | Out-Null
	}
set-location $downloadlocation

function CleanFilename($filename)
{
    return $filename.Replace(":", "-").Replace("?", "").Replace("/", "-").Replace("<", "").Replace("|", "").Replace('"',"").Replace("*","")
}

function DownloadSlides($filter,$videourl)
{
    try 
    {    
        $videourl.rss.channel.item | Where{($_.title -like “*$filter*”) -or ($_.link -like "*/$filter")} | 
        foreach {
	        $code = $_.comments.split("/") | select -last 1	   
	
	        # Grab the URL for the PPTX file
	        $urlpptx = New-Object System.Uri($_.enclosure.url)  
            $filepptx = $code + "-" + $_.creator + "-" + (CleanFileName($_.title))
	        $filepptx = $filepptx.substring(0, [System.Math]::Min(120, $filepptx.Length))
	        $filepptx = $filepptx.trim()
	        $filepptx = $filepptx + ".pptx" 
	        if ($code -ne "")
	        {
		         $folder = $code + " - " + (CleanFileName($_.title))
		         $folder = $folder.substring(0, [System.Math]::Min(100, $folder.Length))
		         $folder = $folder.trim()
	        }
	        else
	        {
		        $folder = "NoCodeSessions"
	        }
	
	        if (-not (Test-Path $folder)) { 
		        Write-Host "Folder $folder dosen't exist. Creating it..."  
		        New-Item $folder -type directory | Out-Null
	        }

	        # Make sure the PowerPoint file doesn't already exist
	        if (!(test-path "$downloadlocation\$folder\$filepptx"))     
	        { 	
		        # Echo out the  file that's being downloaded
		        write-host "Downloading slides: $filepptx"
		        #$wc = (New-Object System.Net.WebClient)  

		        # Download the MP4 file
		        #$wc.DownloadFile($urlpptx, "$downloadlocation\$filepptx")
                Start-BitsTransfer $urlpptx "$downloadlocation\$filepptx" -DisplayName $filepptx
		        mv $filepptx $folder 

	        }
            else
            {
   		        write-host "Slides exist: $filepptx"
            }
	    }

     }
    
    catch
    {
        $ErrorMessage = $_.Exception.Message
        Write-host "$ErrorMessage"
    }
}


function DownloadVideos($filter,$slideurl)
{
#download all the mp4
# Walk through each item in the feed 
$slideurl.rss.channel.item | Where{($_.title -like “*$filter*”) -or ($_.link -like "*/$filter*")} | foreach{   
	$code = $_.comments.split("/") | select -last 1	   
	
	# Grab the URL for the MP4 file
	$url = New-Object System.Uri($_.enclosure.url)  
	
	# Create the local file name for the MP4 download
	$file = $code + "-" + $_.creator + "-" + (CleanFileName($_.title))
	$file = $file.substring(0, [System.Math]::Min(120, $file.Length))
	$file = $file.trim()
	$file = $file + ".mp4"  
	
	if ($code -ne "")
	{
		 $folder = $code + " - " + (CleanFileName($_.title))
		 $folder = $folder.substring(0, [System.Math]::Min(100, $folder.Length))
		 $folder = $folder.trim()
	}
	else
	{
		$folder = "NoCodeSessions"
	}
	
	if (-not (Test-Path $folder)) { 
		Write-Host "Folder $folder) dosen't exist. Creating it..."  
		New-Item $folder -type directory | Out-Null
	}
	
	
	
	# Make sure the MP4 file doesn't already exist

	if (!(test-path "$folder\$file"))     
	{ 	
		# Echo out the  file that's being downloaded
		write-host "Downloading video: $file"
		#$wc = (New-Object System.Net.WebClient)  

		# Download the MP4 file
		Start-BitsTransfer $url "$downloadlocation\$file" -DisplayName $file
		mv $file $folder
	}
    else
    {
   		write-host "Video exists: $file"
    }

#text description from session
	$OutFile = New-Item -type file "$($downloadlocation)\$($Folder)\$($Code.trim()).txt" -Force  
    $Category = "" ; $Content = ""
    $_.category | foreach {$Category += $_ + ","}
    $Content = $_.title.trim() + "`r`n" + $_.creator + "`r`n" + $_.summary.trim() + "`r`n" + "`r`n" + $Category.Substring(0,$Category.Length -1)
   add-content $OutFile $Content
		
	}
}



if ($keyword)
{
    $keywords = $keyword.split(",")
    
    foreach ($k in $keywords)
    {
        $k.trim()
        Write-Host "You are now downloading the sessions with the keyword $k"
        DownloadSlides $k $slide1
        DownloadSlides $k $slide2
        DownloadVideos $k $video1
        DownloadVideos $k $video2
    }
}
elseif ($session)
{
    $sessions = $session.Split(",")
    
    foreach ($s in $sessions)
    {
        $s.trim()
        Write-Host "You are now downloading the session $s"
        DownloadSlides $s $slide1
        DownloadSlides $s $slide2
        DownloadVideos $s $video1
        DownloadVideos $s $video2
    }

}
else
{
    DownloadSlides " " $slide1
    DownloadSlides " " $slide2
    DownloadVideos " " $video1
    DownloadVideos " " $video2
}

 

Previous Post
Bring your “A” game to ESPC16
Next Post
Pluralsight Black Friday Deal – Save $100 (33%) and invest in a brighter you.

5 Comments

  • October 31, 2016 at 9:38 pm
    Sandecker

    VERY useful. Saved a heap of time – and used a lot of bandwidth :-). Looking forward to working my way through the sessions that I’m interested in.

    thanks for posting this.

    Reply
  • November 8, 2016 at 2:46 pm
    Francisco Alvarez

    Excellent event, i download the sessions, great and thanks for share,
    Regards form Mexico City.

    Reply
  • October 2, 2017 at 10:35 am
    simpsin

    Cool.. can’t wait for the 2017 version…

    Reply
  • October 11, 2018 at 12:31 pm
    matt

    Any chance you will update this for 2018? Very useful!!

    Reply
    • November 4, 2018 at 2:57 pm

      Unfortunately Microsoft now publishes them to Youtube, and downloading from Youtube is technically illegal, that is the reason why there is no 2018 post 🙁

      Reply

Leave a Reply