{"id":179,"date":"2017-11-30T00:00:00","date_gmt":"2017-11-30T08:00:00","guid":{"rendered":"http:\/\/officedevblogs.wpengine.com\/?p=179"},"modified":"2021-11-15T10:30:59","modified_gmt":"2021-11-15T18:30:59","slug":"announcing-office-365-cli-for-managing-your-office-365-tenant-on-any-platform","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/announcing-office-365-cli-for-managing-your-office-365-tenant-on-any-platform\/","title":{"rendered":"Announcing Office 365 CLI for managing your Office 365 tenant on any platform"},"content":{"rendered":"<div id=\"body-content\">\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<h2>Manage your Office 365 tenant on any platform<\/h2>\n<p>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 <a href=\"https:\/\/officedevblogs.wpengine.com\/general-availability-of-office-365-cdn\">Office 365 CDN<\/a>,&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/spfx\/tenant-properties\">managing tenant properties<\/a> or&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/sharepoint\/dev\/apis\/alm-api-for-spfx-add-ins\">the application lifecycle<\/a> of your SharePoint add-ins and SharePoint Framework solutions.<\/p>\n<p>See the Office 365 CLI in action:<\/p>\n<div class=\"flex-video widescreen\"><\/div>\n<h2>Getting started<\/h2>\n<p>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:<\/p>\n<pre><br>npm install --global @pnp\/office365-cli<br><br><\/pre>\n<p>After installing the Office 365 CLI, start it, by typing in the command line:<\/p>\n<pre><br>office365<br><br><\/pre>\n<p>Running the `office365` command will start the immersive CLI with its own command prompt.<\/p>\n<p>Start managing the settings of your Office 365 tenant by connecting to it, using the `spo connect &lt;url&gt;` site, for example:<\/p>\n<pre><br>o365$ spo connect https:\/\/contoso-admin.sharepoint.com<br><br><\/pre>\n<p>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.<br>To list all available commands, in the Office 365 CLI prompt type `help`:<\/p>\n<pre><br>o365$ help<br><br><\/pre>\n<p>To exit the CLI, type &#8220;exit&#8221;:<\/p>\n<pre><br>o365$ exit<br><br><\/pre>\n<p>The full documentation of the Office 365 CLI and its commands is available at <a href=\"https:\/\/sharepoint.github.io\/office365-cli\">https:\/\/sharepoint.github.io\/office365-cli<\/a>.<\/p>\n<h2>About the Office 365 CLI<\/h2>\n<p>Office 365 CLI is an open-source project driven by the&nbsp;<a href=\"https:\/\/aka.ms\/sppnp\">SharePoint Patterns and Practices<\/a> initiative. The project is built and managed publicly on GitHub at&nbsp;<a href=\"https:\/\/github.com\/SharePoint\/office365-cli\">https:\/\/github.com\/SharePoint\/office365-cli<\/a> and accepts community contributions. We would encourage you to try it and <a href=\"https:\/\/github.com\/SharePoint\/office365-cli\/issues\">tell us what you think<\/a>. We would also love your help! We have a number of feature requests that are a&nbsp;<a href=\"https:\/\/github.com\/SharePoint\/office365-cli\/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22\">good starting point<\/a> to contribute to the project.<\/p>\n<p><span style=\"font-size: large\"><em>&ldquo;Sharing is caring&rdquo;<\/em><\/span><\/p>\n<hr>\n<p><i><a href=\"https:\/\/twitter.com\/officedevpnp\">SharePoint PnP team<\/a>&nbsp;&#8211; 30th of November 2017<\/i><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>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.<\/p>\n","protected":false},"author":69078,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office-add-ins"],"acf":[],"blog_post_summary":"<p>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.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69078"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=179"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/179\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}