Microsoft Ignite Australia 2017 Sessions Downloader

Microsoft Ignite Australia 2017 Sessions Downloader

Following on from my previous post on downloading the New Zealand Ignite 2016 session downloader, I have modified the script to help download the Australian Ignite 2017 Content as well. The content is still getting updated as the Conference only finished last Friday 17th February 2017.

Vlad Catrinescu is a SharePoint and Office 365 MVP and also a Pluralsight Author. You can find him on Twitter and on his Blog . He has written an awesome PowerShell script which has been around for the last few Ignites, wherein which you can download the Sessions, slides and videos from Channel 9 for Offline Browsing. I have used the same script by editing it to download the Australian Ignite 2017 Sessions.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#Script written by Vlad Catrinescu
#Visit my site www.absolute-sharepoint.com
#Twitter: @vladcatrinescu
#Originally Posted here: https://absolute-sharepoint.com/2016/10/the-ultimate-script-to-download-microsoft-ignite-2016-videos-and-slides

#Edited by Aben Samuel (@neop26) to download the Australia 2017 Ignite Content

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

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

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

This post has the scripts to help download the NZ Ignite 2016 Content.
Cheers

Full Script: AustraliaIgnite2017PowerShellScript

Deploying Microsoft Azure PowerShell on Ubuntu 16.04

Deploying Microsoft Azure PowerShell on Ubuntu 16.04

Microsoft is serious about “We really don’t care about which device an end user wants to use”. Check out some of the news articles of the last few weeks:

  1. Visual Studio to be available on MAC which means users now have a complete IDE for everything mobile , cloud and MAC Development.
  2. If you are not it using already, Visual Studio Code for all the 3 major desktop flavours Windows, Linux and Mac
  3. Microsoft fortifies its commitment to Open Source by becoming a Platinum member for Linux Foundation
  4. Build, deploy and support Azure deployments from Ubuntu and Mac. I will cover the Ubuntu steps in this post.
  5. SQL Server on Linux . Will cover this in a post shortly.

(more…)

Office Shared Activation Installation

Office Shared Activation Installation

Deploying a Remote Desktop that required Office 2013 to be part of the software that are installed for your users? Office 2013 and in specific Office 2013 Pro Plus can be deployed onto this Remote Server / Desktop using a new installation Technology called Click-To-Run. This method can also be used to deploy Office locally within a network as well. (more…)