SharePoint Online

How to get all OD4B sites via PowerShell

This article describes how to get a list of all OneDrive for Business sites in your organisation you have in SharePoint Online and how to export them into a CSV file.


SharePoint Online module

To establish a connection to SharePoint Online services of Office 365 you need the SharePoint Online module you get from Microsoft. Depends on which version you are using of PowerShell you have two possibilities to install this module.

PowerShell (all versions)

You have to install the SharePoint Online Management Shell. The SharePoint Online Management Shell is a tool which includes the module for Windows PowerShell to organize the SharePoint Online abo Office 365 (Connect-SPOService).
You can download the tool here:

PowerShell (version 5)

If you are using PowerShell 5.0 or newer, you can install the SharePoint Management Shell from the PowerShell Gallery by using the following command:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell

How to

0 Kommentare zu “How to get all OD4B sites via PowerShell

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.