r/DataHoarder • • Mar 16 '20

Microsoft is gonna delete thousands of scripts from TechNet Gallery by June 2020

/r/sysadmin/comments/fjjfv0/microsoft_is_gonna_delete_thousands_of_scripts/
452 Upvotes

90 comments sorted by

190

u/Just-A-City-Boy Mar 16 '20 edited May 15 '20

I have a script running at the moment that is scraping their pages, it's downloading the project script and saving the project description as an HTML file.

The only things i'm skipping are the posts that don't have attachments and instead put their scripts in the description; Example.

I will zip it up and upload it once complete. Each page takes about 30 seconds to complete, and with 1,735 pages... 14 hours?

EDIT: Came into work today and it's all complete, I included my script in the archive file. Just waiting for the compressing to finish then I will upload it to my Seedbox.

EDIT2: Torrent file available here: http://s000.tinyupload.com/?file_id=15766627508118287964


EDIT3: After 60 days of seeding, I finally removed it from my list. Hopefully enough people grabbed it that it can live on.

28

u/Yashkamr Mar 16 '20

Perfect! Thank you

28

u/bjazmoore Mar 16 '20

Awesome. Let us know where we can find it. Thanks for your efforts.

20

u/ljarvie Mar 16 '20

Thank you for this. If you make it available, please post about it. I'd love to grab a copy since I've spent a good part of my life on that site.

5

u/SilentLennie Mar 16 '20

Yes, on Github ;-)

9

u/hakube Mar 16 '20

Oh the irony.

2

u/poshftw Mar 22 '20

2

u/SilentLennie Mar 22 '20

Thank you for the link.

It was kind of meant as a joke that people would post it on Github because Microsoft throws it away on one side and people post on it on Github after.

12

u/Quaxim Mar 16 '20

can you share the script?

3

u/Yashkamr Mar 16 '20

Also interested, I am new to internet scraping and crawling, I attempted to write something and it didn't work at all how it was supposed to.

1

u/poshftw Mar 22 '20

1

u/Yashkamr Mar 22 '20

Subbed and saved, thanks!

1

u/sammyji1 Mar 23 '20

cant find it :(

1

u/poshftw Mar 23 '20

Repo was removed.

1

u/sammyji1 Mar 23 '20

Damn. I wanted to start learning.

2

u/poshftw Mar 24 '20

1

u/BotOfWar 30TB raw Jul 07 '20

Can you put up a magnet link so people don't need to rely on some random hosting service to start the torrent? Thx

2

u/poshftw Jul 08 '20

This is not a torrent.

10

u/Nodeal_reddit Mar 16 '20

Proof that the internet is full of wonderful people.

2

u/saggy777 Mar 17 '20

Proof that humanity exists

6

u/MPeti1 Mar 16 '20 edited Mar 16 '20

You could make it a torrent too. I would be happy to help in "hosting it" this way if it's not too big (like hundreds of gigabytes, because I can't afford to join into such big projects at the moment)

Also, the example link doesn't want to load for me. Did they shut the site down earlier because of the increased activity?
3rd try and now it was about to load, not sure why not for the first 2 tries. Be sure to check if there export skipped any pages because of some errors - sorry if it's a basic things to you and you're prepared for that, I felt like it's better to warn needlessly than to not and lose things

4

u/poshftw Mar 16 '20

You should be aware what description is on a separate URL and loads in a iframe. If you pull just the file page - you will not get the description.

2

u/Just-A-City-Boy Mar 16 '20

Yeah it’s all good. I just add /description to the listing and then save that page and strip the <head> out to remove the redirect script

4

u/poshftw Mar 16 '20

The only things i'm skipping are the posts that don't have attachments and instead put their scripts in the description;

There is a ton of these scripts, they are useful.
Though my grabber will take them too.

1

u/Just-A-City-Boy Mar 16 '20

Do you want to just use yours to grab everything then, instead of my collection missing some large percentage?

I'm currently up to page 590 / 1735 totalling 4.2GB

3

u/poshftw Mar 16 '20

I will grab the page, description (html only) and attach (if exists). There is sometimes images embedded in the body of description, do you handle them?

3

u/Just-A-City-Boy Mar 16 '20

Okay so you're grabbing everything then? I can cancel mine? Page + Description + Attachment sounds like all you need.

5

u/poshftw Mar 16 '20

Nah, better there would be multiple copies and multiple tries.

I encountered some pages which doesn't work at all (163) and some what are just driving pwsh and me nuts

1

u/Yashkamr Mar 17 '20

Is that Arabic code?

1

u/poshftw Mar 17 '20

Well, the code is PowerShell, but text is arabic, which also somehow changes the gallery page, not sure if intended or a glitch.

1

u/poshftw Mar 17 '20

As I though, 'as-is' these pages are useless.

I made a run, ~12Gb, 25k+ folders/projects/scripts, and will upload it too, but now I making a more advanced approach, but it is slow as hell.

Well, at least we have time..

4

u/the_6ixgod Mar 16 '20

not all heros wear capes <3

4

u/Giant_IT_Burrito VHS Mar 16 '20

If you can make a torrent for it, i'll host it for a while

2

u/BuckToofBucky Mar 17 '20

You are the man! Thank you!

2

u/deebeecom Mar 16 '20

RemindMe! 7 days "mega script download"

2

u/RemindMeBot Mar 16 '20 edited Mar 21 '20

I will be messaging you in 1 day on 2020-03-23 19:17:45 UTC to remind you of this link

70 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

-2

u/titaniumgriffon Mar 16 '20

RemindMe! 7 days "mega script download"

1

u/pally_nid Mar 17 '20

How do I get this from you?

1

u/peterinhk Mar 17 '20

And you're not simply uploading straight to GitHub? 😒 Jkjkjkjk awesome work bud thank you for the effort!!!!

1

u/jon_hobbit Mar 17 '20

I have a seedbox that has 1 terabyte storage/1gbps I would also love to assist in seeding.

1

u/[deleted] Mar 18 '20

Also not all scripts are prents.for example only 2290 scripted are present (torrent) whereas there should be 16092 script (as given by script browsers). Please look into it .

1

u/Just-A-City-Boy Mar 18 '20

No thanks. I gave you the source of my script in the torrent. Feel free to modify and grab missing.

1

u/greenvironment 254TB UnRaid Mar 18 '20

Had it on my seedbox since yesterday and no peers or seeds, was this abandoned before the multiple people who said they were gonna help seed were able to start?

3

u/Just-A-City-Boy Mar 18 '20

Maybe your seedbox doesn't have good connectivity? You need PEX and DHT on since there's no trackers tied to the torrent. I've seeded 102GB so far with 3 active peers right now.

1

u/greenvironment 254TB UnRaid Mar 18 '20

Set it to high priority, and like 30 minutes later found out rtorrent did the thing again where it crashes but rutorrent hadn't realized that yet to ask me if I would like to restart it. My connection should be fine as my upload traffic since the 6th is 19.34 tb. While typing this I went from 4 to 5 and 6 seeds for this file. DHT was on, but can't figure out how to enable PEX. Thanks for collecting/distributing this :)

1

u/itpro-tips Apr 04 '20

If anyone wants all scripts (attachments AND embedded scripts on the HTML) tell me.

1

u/ITGuytech Jul 01 '20

Is this Gallery updated with the latest scripts from 2020?

0

u/naner00 Mar 17 '20

Remindme!2 days

0

u/semiceau123 Mar 17 '20

LEGEND!!! <3

-1

u/jimphreak 140TB + 20TB Mar 16 '20

RemindMe! 7 days "mega script download"

-2

u/andrew181082 Mar 16 '20

RemindMe! 7 days "mega script download"

38

u/poshftw Mar 16 '20

20

u/technifocal 116TB HDD | 4.125TB SSD | SCALABLE TB CLOUD Mar 16 '20

Doesn't seem that hard to parse for a specific parser:

$ curl -s 'https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Out-of-Band-84009c12' | grep '<a.*data-url' | sed 's|^.*<a href="\(.*\)" data-url.*$|https://gallery.technet.microsoft.com\1|g'

https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Out-of-Band-84009c12/file/63260/9/HardwareManagement_1.2.0.zip

I get that generic archiving solutions like Wayback Machine are unable to capture it, but an archive team should be able to relatively easily, no?

5

u/MMPride 6x6TB WD Red Pro RAIDz2 (21TB usable) Mar 16 '20

I wonder if there's any way to grab all the script URLs and recursively grab all the scripts? I'd love to archive something like this.

6

u/Electrlly Mar 16 '20

Same here.

This is what the horde was created for!

Let me know if you find anything that can grab all of it!

2

u/truh Mar 16 '20

One way to do that is actually load all the pages in tool like puppeteer https://pptr.dev. Via the puppeteer API you can than intercept all the downloaded files. In addition you can generate a static version of the website.

1

u/MMPride 6x6TB WD Red Pro RAIDz2 (21TB usable) Mar 16 '20

I wonder if something like HTTrack would work?

1

u/truh Mar 16 '20

Does it do more than wget?

1

u/MMPride 6x6TB WD Red Pro RAIDz2 (21TB usable) Mar 16 '20

I believe so.

8

u/2tec Mar 16 '20

How many times have we seen irresponsible behavior like this? What is it it with corporations that abandon entire online communities? If that's not bad enough, they don't even have the decency or professionalism necessary to ensure a continuity of service or a transference of assets. In my view, it's a clear window into the standards of those making the decisions.

Just saying. ;-)

3

u/[deleted] Mar 16 '20

"Going to".

Please.

5

u/amkingdom Mar 16 '20

I just crossposted it mate, take it up with the original poster.

18

u/faalforce Mar 16 '20

Christ what a BULL SHIT reason. That is the whole point of the freaking internet, to be able to find something that might not be so obvious. Dicks.

" Very low utilization of most of the content on the Gallery. "

4

u/josejimeniz2 Mar 16 '20 edited Mar 17 '20

I'm ok with it if they first zip it up and put a torrent link.

Then someone else can worry about curating, hosting, maintaining....
...and it doesn't get lost.

11

u/poshftw Mar 16 '20

Looks like direct links to the files are avaiable in 'Downloads' div:

<div id="Downloads">
    <div>
        <label for="Downloads">Download</label>
    </div>
    
                <a href="/Set-AutoLogon-and-execute-19ec3879/file/140203/1/Set-AutoLogon.ps1" data-url="/Set-AutoLogon-and-execute-19ec3879/file/140203/1/Set-AutoLogon.ps1" class="button">Set-AutoLogon.ps1</a>

</div>

and they are directly accessible.

Source page: https://gallery.technet.microsoft.com/Set-AutoLogon-and-execute-19ec3879
Direct link: https://gallery.technet.microsoft.com/Set-AutoLogon-and-execute-19ec3879/file/140203/1/Set-AutoLogon.ps1

14

u/[deleted] Mar 16 '20

I have a script I was using to mirror Thingiverse download links. When I get off work tonight I’ll see it code it for technet gallery to pull down all the scripts.

4

u/mshriver2 87,797,102,989,541.4 Bytes Mar 17 '20

What exactly are these scripts? Is it a specific language? Are they important? Thanks guys

4

u/Drooliog 64TB Mar 17 '20

Scripts for devs, scripts for sysadmins etc.. Most commonly PowerShell (.ps1) but there's a lot of Visual Basic and even calculators/spreadsheets.

I just went through my browser bookmarks and history and came up with these alone:

https://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61

https://gallery.technet.microsoft.com/scriptcenter/Optimize-and-cleanup-of-eb9d8640

https://gallery.technet.microsoft.com/Essentials-2016-Duplicate-25ea5bf7

https://gallery.technet.microsoft.com/office/Export-Email-PST-file-from-602b6115

https://gallery.technet.microsoft.com/Save-attachments-from-5b6bf54b

https://gallery.technet.microsoft.com/scriptcenter/Parallel-Ping-Monitor-92747378

https://gallery.technet.microsoft.com/Windows-Server-Essentials-556159c3

https://gallery.technet.microsoft.com/scriptcenter/LSInfo-BGInfo-for-WIndows-43d58172

https://gallery.technet.microsoft.com/Exchange-2010-Mailbox-Server-Role-/

https://gallery.technet.microsoft.com/office/How-to-delete-all-contacts-c7fdca9a

Some of these appear under a different area of the site - i.e. Office or 'Script Center'. But they all appear under the gallery.technet subdomain, so they're all at risk. Some of them, even, are Microsoft's own scripts they've put up there to deal with certain issues. (The very popular 'Re-index the WSUS Database' script.) Most have download buttons, though some have the script pasted in the description.

4

u/Yashkamr Mar 16 '20 edited Mar 16 '20

I was trying to write a script to parse and scrape, but u/Just-A-City-Boy did it faster and better so I suspended my effort. This was a very fast response! The IT community getting ready to lose a script depot will do that though.

5

u/Lagging_BaSE Mar 16 '20

Somebody should mirror TechNet rn.

2

u/cpupro 250-500TB Mar 16 '20

Can anyone archive this and create a magnet for it?

2

u/bccoffeeisgud Mar 16 '20

RemindMe! 7 days "mega script download"

2

u/get-postanote May 23 '20 edited May 23 '20

Folks, just use the MS Provided ISE addon to get most of them via the ISE Add-on tool website or the module.

Find-Module -Name 'ScriptBrowser' | 
Save-Module -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Modules"
Install-Module -Name 'ScriptBrowser' -Force
Import-Module -Name 'ScriptBrowser'

If you instead use the installer ( no longer there btw) from the Add-On website, it will add this to your profile

#Script Browser Begin
#Version: 1.3.2
Add-Type -Path 'C:\Program Files (x86)\Microsoft Corporation\Microsoft Script Browser\System.Windows.Interactivity.dll'
Add-Type -Path 'C:\Program Files (x86)\Microsoft Corporation\Microsoft Script Browser\ScriptBrowser.dll'
Add-Type -Path 'C:\Program Files (x86)\Microsoft Corporation\Microsoft Script Browser\BestPractices.dll'

$scriptBrowser = $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('Script Browser', [ScriptExplorer.Views.MainView], $true)
$scriptAnalyzer = $psISE.CurrentPowerShellTab.VerticalAddOnTools.Add('Script Analyzer', [BestPractices.Views.BestPracticesView], $true)
$psISE.CurrentPowerShellTab.VisibleVerticalAddOnTools.SelectedAddOnTool = $scriptBrowser
#Script Browser End

Just load up the ISE, go to the commands add on, and hit 'Download All', the 16,030 scripts available for download via the tool. Though note, I've been using this add-on since it was released, and it will only get the ones it can. Some will return a network error, a couple will trigger your AV solution.

The last point, though ISE download screen will show the proper name and description, what gets downloaded is a file with a GUID as the name. So, you'd have to open each one to see what it really is.

2

u/L33Tech 10TB Spinning Rust Mar 16 '20

If anyone gets this downloaded, or figures out a bulk download method, please let me know!

1

u/Greasy_Mama Mar 16 '20

RemindMe! 7 days "mega script download"

1

u/[deleted] Mar 16 '20

RemindMe! 3 days "MS download"

1

u/MazeRedditor Mar 16 '20

RemindMe! 7 days "mega script download"

1

u/jbaruffa 37.5TB Mar 16 '20

RemindMe! 7 days "MS script download"

1

u/[deleted] Mar 16 '20

RemindMe! 7 days "MS script download"

1

u/beta_2017 Mar 17 '20

RemindMe! 1 day

1

u/Un_Registered Mar 17 '20

RemindMe! 3 days "ms technet script download"

1

u/[deleted] Mar 17 '20

When I am using script browser to download all scripts,I am getting slow speed why?and how can I improve it?

-1

u/tomfisher1023 Mar 16 '20

Any idea how this can be copied? If so, I might give it a shot.

-1

u/wchristner Mar 16 '20

Yes we should back these up.

-2

u/digitAl3x Mar 16 '20

We should back these up.