SOLVED Free Microsoft ebooks.

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
The site offers a PowerShell script you can use to download the entire collection if you want.

The idea being, you do not have to individually select one at a time and download it - great idea!

Having said that, the Creator of the Script made a small mistake, and forgot to use a cmdlet which sets the directory on your computer, before attempting to download the files to that directory.

So I've attached a file with the correct scripting for anyone wanting to use PowerShell to download all the files.
  • Download the attached .txt file
  • Scan the download with your security software
  • When happy file is safe, open then copy the contents
  • Now type powershell in your Search field
  • In the search results, right-click on Windows PowerShell and select Run as administrator
  • Click yes to the UAC prompt
  • Now paste what you copied into the Administrator: Command Prompt console
Notes:
  • If you want a different location to save files to, refer to the .txt file. I've made some notes about how to do that just above the modification I made to the original script.
  • You may need to press Enter key to kick start the connection.
  • Once you see the downloads start then you can carry on doing other things on your computer.
  • When its finished downloading the files, close the powershell console
  • If you close the console before downloads are completed, you will not receive all files!
  • There are 355 files in total! Some are duplicates though as there are different file formats:
    • .doc
    • .pdf
    • .epub
    • .mobi
  • If you see a red error message at base of console, its most likely telling you there is a Server Connection Error. That is not unusual, given there may be many people trying to download the files there. Don't panic! The script is just paused and will continue working as soon as Server is free again - probably within seconds! No files will be lost or damaged.

When I get some more time I may post some new scripts in this thread that allows you to download only one file format, which you can choose from a prompt,as that will save you wasting space storing the same book in several file formats, and also, if possible, I'll see if I can present a readable list of books, so you can check those you want to download, and omit a check if you do not want the book. Or someone else can if they have spare time :D
 

Attachments

  • Download_ALL_Files_Using_PowerShell.txt
    4.8 KB · Views: 474
Joined
Jul 7, 2016
Messages
212
Reaction score
38
:D I see you are already on the ball, gentlemen. just thought it may be of use to the members.:cool:
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
Well I finally managed to complete the aforementioned project to improve the Scripts for downloading these free eBooks, Attached are two choices:
  • FreeMicrosoftEBooks.txt
    • Simply download
    • Do a virus scan with your security software
    • When happy all is safe, open the file and select Edit > Select all then Edit > Copy
    • Now press your Windows key + S then in the Search field type powershell
    • In the search results, click on Windows PowerShell ISE
      • Paste what you copied into the top script panel, then click File > Run

  • FreeMicrosoftEBooks.zip
    • Simply download
    • Do a virus scan with your security software
    • When happy all is safe, right-click on FreeMicrosoftEBooks.zip and select Extract all
    • Click the Extract button
    • After the files are extracted you will be automatically in a new folder: FreeMicrosoftEBooks
      • This folder has two files:
        • FreeMicrosoftEBooks.exe
        • FreeMicrosoftEBooks.exe.config
      • Simply double-left-click on the FreeMicrosoftEBooks.exe to run the script.

This new script allows you to to the following:
  • Download all 360 eBooks in all available file formats
  • Download all eBooks of one file type only
  • Download all file types available of eBooks on a specific Category
  • Download one file type only of eBooks on a specific Category
  • The Script will create Directories and also sub-directories automatically:
    • Default Directory location is C:\Users\[your username]\Documents
    • All other sub-directories are located inside the default directory
    • If you want to change where files are saved to, consult notes in the text file
  • The script automatically checks all Arrays, and File names, and File sizes.
    • If you lose power, have to stop downloading, etcetera, you can re-run the Script, which will be able to redownload corrupted files, pick up downloading partial downloads, and skip downloading files that all ready exist.
  • There are some try {} catch {} messages that will appear in red text during the running of the script. Generally it is safe to ignore most, but if you do run into trouble, take a closer look at what the red text is saying, as I have coded some suggestions for particular scenarios.
    • If you re-run the Script you will see a lot of red text, which will simply be telling you the default Directory, and/or sub-directories all ready exist. This will not prevent the script downloading files.

I've done my best to check for possible bugs, and fix those I spotted.

Big thanks to Ian who kindly helped with debugging.

It's a very long script though: 9928 lines of code, so being human its possible I missed something. If you do run into a bug please let me know. Also, if you have ideas for improvement to the Script, let me know too.

Regards,

Regedit32​
 

Attachments

  • FreeMicrosoftEBooks.txt
    461.5 KB · Views: 543
  • FreeMicrosoftEBooks.zip
    151.3 KB · Views: 346
Joined
Apr 10, 2017
Messages
36
Reaction score
3
Well I finally managed to complete the aforementioned project to improve the Scripts for downloading these free eBooks, Attached are two choices:...
[deleted to save space]

Regards,

Regedit32​
This looks wonderful. However, I am a novice on using PowerShell. I just want to pick out several ebooks (maybe a dozen), but they don't seem to be in just one category. Will the script give me options to pick & choose individual ebooks?
Thanks again for all your hard work!
Phil
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,617
Reaction score
1,139
Hi Phil,

No I have not added that functionality to the Script because you can go to the website storing the eBooks and individually download the ones you want there.

https://blogs.msdn.microsoft.com/ms...wer-bi-azure-windows-8-1-office-2013-sharepo/

The purpose of the Script was to help the User download bulk files rather than having to manually download one at a time. I could add that functionality to the Script if people want me to.
 
Joined
Apr 10, 2017
Messages
36
Reaction score
3
No. I appreciate it, but it would probably take me less time to download a dozen or so ebooks than for you do modify your script. I'm sure your time is better spent doing something else.;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top