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.
Manage your Office 365 tenant on any platform
Office 365 CLI is a cross-platform command-line interface that you can use on any platform to manage some of your Office 365 settings, such as enabling the Office 365 CDN, managing tenant properties or the application lifecycle of your SharePoint add-ins and SharePoint Framework solutions.
See the Office 365 CLI in action:
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`:
o365$ help
To exit the CLI, type “exit”:
o365$ exit
The full documentation of the Office 365 CLI and its commands is available at https://sharepoint.github.io/office365-cli.
About the Office 365 CLI
Office 365 CLI is an open-source project driven by the SharePoint Patterns and Practices initiative. The project is built and managed publicly on GitHub at https://github.com/SharePoint/office365-cli and accepts community contributions. We would encourage you to try it and tell us what you think. We would also love your help! We have a number of feature requests that are a good starting point to contribute to the project.
“Sharing is caring”
SharePoint PnP team – 30th of November 2017