Developers on all platforms build solutions for Office 365. Using the Office 365 CLI, they can manage the different settings of SharePoint and Office 365 no matter if they use Windows, macOS or Linux.

There are 1 million SharePoint and Office 365 developers across the world. Thanks to the various Microsoft investments spanning from Office web add-ins to the SharePoint Framework, these developers can build rich solutions on any platform. Using market-standard web technologies, they can apply their existing experience and build solutions for some of the 200.000 organizations worldwide using SharePoint as their collaboration platform.

While building solutions for SharePoint and Office 365 expands beyond the Windows operating system, managing many of the platform settings is possible only through PowerShell on Windows. To better support developers on other platforms, we are pleased to introduce the cross-platform Office 365 CLI.

Getting started

Office 365 CLI is built in Node.js and distributed as an npm package. You can install it using npm by typing in the command line:

npm install --global @pnp/office365-cli

After installing the Office 365 CLI, start it, by typing in the command line:

office365

Running the `office365` command will start the immersive CLI with its own command prompt.

Start managing the settings of your Office 365 tenant by connecting to it, using the `spo connect <url>` site, for example:

o365$ spo connect https://contoso-admin.sharepoint.com

Depending on which settings you want to manage, you might need to connect either to your tenant admin site (URL with `-admin`) in it, or to a regular SharePoint site. For more information refer to the help of the command you want to use.To list all available commands, in the Office 365 CLI prompt type `help`: