ACS Blogs

A blog site for Architecting Connected Systems staff to tell the world about their exploits in
SharePoint 2007/2010/2013, Windows Workflow Foundation (3.0/4.0) and other great technologies!
Welcome to ACS Blogs Sign in | Join | Help
in Search


Download all SPC12 PowerPoints and Videos - PowerShell Script

Back by popular demand, here is the script to grab all the PowerPoints and Videos.  This year the script shouldn't take down the site (like it did last year b/c everyone downloaded it and ran it at the same time) as they actually built it on Azure (blobs)!!!

The authentication part was quite a bit different than last year's because you needed to pass the wctx to azure after you were logged into LiveID.  This then must be passed on to the MySPC website where you are then simply using an ASP.NET Session and a .ASPXAUTH cookie.

Once logged into the site, you must hit every session page.  I did this for you already and all the valid session ids are in the "sessions.txt" file.  If you find I missed one, simply add it to the file and re-run the script. After hitting a page, you will see that the links to the files are stored in an Azure Blob endpoint (  The links to these end points expire after a small amount of time and have a querystring auth component.   This means you need to download the files as you hit each page.  If you wait too long, you will need to get the links again.

There are two important variables in the script (one is downloadPPTX and the other is downloadVideos).  I'm not that interested in videos so by default, the variable is set to $false.  Being that this is on Azure, I was somewhat surprised to see the performance wasn't that great.  I would have though the files would download a lot quicker!

RAR File is attached below... be sure to run it a few times over the next few days...they still haven't posted all the powerpoints and videos.

UPDATE:  Add the following to the script to handle special characters in your password:

#endcode the password
$encodedPassword = [System.Web.HttpUtility]::UrlEncode($password)
GetAuth $username $encodedPassword


Published Monday, November 19, 2012 12:58 AM by cjg
Filed under:

Attachment(s): spc12.rar



dbhaver said:

How do you get to the Azure Blob endpoint to download the files?

November 20, 2012 5:58 AM

cjg said:

You need an auth components in the URL.  It only lasts for a short time and is only available after you have logged in to MySPC

November 20, 2012 6:16 AM

dbhaver said:

When trying to run this script from a Windows 8 machine I am getting the following error.

Exception calling "Substring" with "1" argument(s):  "StartIndex cannot be less than zero.

Parameter name: startIndex"

At C:\SPC12\GetAllPPTS_SPC2012.ps1:247 char:1

+ $aspxauth = $strCookies.substring($strCookies.indexof(".ASPXAUTH="))

+ ------------------------------

+CategoryInfo : NotSpecified: (:) [], MethodInvocatationException

+FullyQualifiedErrorID : ArgumentOutOfRangeException

November 20, 2012 6:32 AM

CJG said:

The SharePoint conference 2012 was this past week (11/11-11/15). It was one of my favorite conferences

November 20, 2012 9:36 AM

mattein said:

Thank you for sharing!

I improved your script a little to

- create a folder named "SPC<sessionnumber> - <sessiontitle>"

- create a html file with the session info in the folder

- create an index page with an overview over all sessions

- made the target dir configurable

- fixed encoding issues in filenames/urls i.e. in SPC177

Extract it to c:\spc12

Not pretty but it works. You might require to be logged in into MYSPC in IE meanwhile though.

You can download it here

Have fun :-)



November 21, 2012 1:09 AM

cjg said:

Good job Mattias!

November 21, 2012 6:21 PM

rbodenschatz said:

Mattias, the mods look great. Hit a couple of issues though that may or may not be related. I get this error when running:

The term 'Remove-bhild' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and

try again.

At C:\SPC12\GetAllPPTS_SPC2012_v4.ps1:420 char:13

+ Remove-bhild <<<<

   + CategoryInfo          : ObjectNotFound: (Remove-bhild:String) [], CommandNotFoundException

   + FullyQualifiedErrorId : CommandNotFoundException

Also, the index.html and details.html are filled with gobberish (to me):



November 22, 2012 6:15 AM

rbodenschatz said:

Mattias just uploaded an update that addressed my issues. Thanks Mattias!!!

November 22, 2012 11:11 AM

mattein said:

Actually I posted an update here but it seems it got lost :-(

BTW After finally downloading all 265 sessions with 71,5 GB ! I found out that one session does not have a video and another sessions filename for the video does not fit the regular expression I am using to retrieve the session id.

So both of these sessions will have folders starting with " - <session name>" instead of "SPC<session id> - <session name>

I suppose you guys can rename the folders manually. I am not going to fix the script for that :o)

November 22, 2012 11:46 AM

TomCastiglia said:

Chris and Mattias - thanks for your work on this.  So far it's working great for me.  5 down, 260 to go (including videos).

-Tom Castiglia

November 23, 2012 9:43 PM

SharePoint Development Blog by Jeremy Thake said:

With an official announced 10,000 attendees at the SharePoin ...

November 26, 2012 5:02 PM

fabian williams said:

Yo Chris and/or Mattias So, using Windows 8 or Windows 2008R2 to run your scripts i get an error right off the bat related to

Exception calling "Remove" with "2" argument(s): "Count cannot be less than zero.

Parameter name: count"

At C:\spc12\GetAllPPTS_SPC2012_v5.ps1:150 char:23

+ $nap = $results.remove <<<< (0, $results.indexof("NAP"))

   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

   + FullyQualifiedErrorId : DotNetMethodException

You cannot call a method on a null-valued expression.

At C:\spc12\GetAllPPTS_SPC2012_v5.ps1:151 char:35

+ $nap = $nap.remove(0, $nap.indexof <<<< ("value") + 7)

   + CategoryInfo          : InvalidOperation: (indexof:String) [], RuntimeException

   + FullyQualifiedErrorId : InvokeMethodOnNull

Im running PoSH shell as Adminstrator I am logged into mySPC in IE

November 27, 2012 9:28 AM

darzynrb said:

Can someone please post a ffp of the entire download using Matthias' code?  I think I may have some partial downloads...  Thanks!

December 4, 2012 11:31 AM

darzynrb said:

The two sessions that need to be changed manually are:

- Session 533 - SPC236R - The value of an Enterprise Content Management platform for the business {Marco Brinkman}

- Session 1005 - SPC236 - The value of an Enterprise Content Management platform for the business {Marco Brinkman}

December 5, 2012 7:57 AM

SharePoint Daily said:

Just one week left. Enter for your chance to win a Bamboo t-shirt . - Dooley Top News Stories Inside

December 6, 2012 6:54 AM

mattgroves said:

@Fabian - I've wasted hours tracking this down - the error from line 150 in Matthias script (or 118 in the original) is due to the cookie not being set correctly, which in my case was due to the $password being passed including some special characters, rather than mess around I've simply changed my LiveID password to something simple (avoiding #@£$% etc).

Win8 was a red herring!!!!!

Now I'm (finally) downloading the files...

December 6, 2012 1:24 PM

fabian williams said:

Matt Thanks, Got your Linked In message as well, I am pulling them down now and I told Chris about the issue as well, ofcourse I took the easy way out and just changed my password LOL

December 9, 2012 8:47 PM

cjg said:

To handle special characters in your password, update the script to have this:

#endcode the password


$encodedPassword = [System.Web.HttpUtility]::UrlEncode($password)

GetAuth $username $encodedPassword

Thanks to Andrew Connell for this...

January 17, 2013 2:17 PM

check over here said:

CJG : Download all SPC12 PowerPoints and Videos - PowerShell Script

November 5, 2014 7:20 PM
Anonymous comments are disabled

This Blog


Powered by Community Server, by Telligent Systems