Wednesday, December 6, 2017

Office 365 CLI

Office 365 Management with command line was limited to Windows users. With the recent announcement of Office 365 CLI you are now able to mange different settings of SharePoint and Office 365 using Linux, macOS including Windows. Office 365 CLI is a cross-platform command line interface which can be used to mange some of the Office 365 settings.

Its built in Node.js and is distributed as a npm package. Use the below command to install it using npm.
 npm install --global @pnp/office365-cli  

Next, start by typing "office365" which will change the command prompt.
 office365  

You can start start managing your Office 365 tenant by connecting using the "spo connect" followed by your tenant admin URL.
 spo connect https://quicksilver-admin.sharepoint.com  

As soon as you type the above command you will be give a URL followed by a code to be entered in the browser.


As soon as you add the code, you will be asked to accept the necessary permissions to your tenant through Azure Active Directory, as shown below.
Type "Help" command to get the full list of commands. Testing it, I believe it has a long way to go. But as community driven project, this will evolve so fast. Oh! btw.. use "exit" to exit the console. :)


No comments: