Book Image

PowerShell for Office 365

By : Martin Machado
Book Image

PowerShell for Office 365

By: Martin Machado

Overview of this book

While most common administrative tasks are available via the Office 365 admin center, many IT professionals are unaware of the real power that is available to them below the surface. This book aims to educate readers on how learning PowerShell for Offi ce 365 can simplify repetitive and complex administrative tasks, and enable greater control than is available on the surface. The book starts by teaching readers how to access Offi ce 365 through PowerShell and then explains the PowerShell fundamentals required for automating Offi ce 365 tasks. You will then walk through common administrative cmdlets to manage accounts, licensing, and other scenarios such as automating the importing of multiple users,assigning licenses in Office 365, distribution groups, passwords, and so on. Using practical examples, you will learn to enhance your current functionality by working with Exchange Online, and SharePoint Online using PowerShell. Finally, the book will help you effectively manage complex and repetitive tasks (such as license and account management) and build productive reports. By the end of the book, you will have automated major repetitive tasks in Office 365 using PowerShell.
Table of Contents (16 chapters)
Title Page
About the Authors
About the Reviewer
Customer Feedback

Data migration

The last topic concerning site collections is document migrations. All the content covered in this chapter also applies to SharePoint sites.

There are three alternative methods to upload data in Office 365:

  • The CSOM API
  • The SPO API
  • Office 365 Import service

Let's look at each one in detail.


Initially, the CSOM API was the only method available to upload documents to SharePoint Online. CSOM is a comprehensive API that is used for application development and administration. It is a great tool for a myriad scenarios, but it is not specialized for content migrations. When used for this purpose, we can go over the API throttling limits (Microsoft has purposely not put a specific number to this as it depends on multiple factors). Your scripts might get temporarily blocked (requests will get a 429 Too Many Requests HTTP error), and if the misuse continues for an extended period of time, your tenant might get blocked altogether (503 Service Unavailable). The tenant administrator...