CLI for Microsoft 365 v3.12

Published Jul 30 2021 02:28 AM 2,104 Views

CLI for Microsoft 365 3.12CLI for Microsoft 365 3.12

 

Manage Microsoft 365 and SharePoint Framework projects on any platform

 
CLI for Microsoft 365 is a cross-platform CLI that allows you to manage various configuration settings of Microsoft 365 and SharePoint Framework projects no matter which operating system or shell you use.
 
While building solutions for Microsoft 365 expands beyond the Windows operating system, managing many of the platform settings is possible only through PowerShell on Windows. As more and more users work on non-Windows machines, it’s inconvenient for them to have to use a Windows virtual machine to configure their tenants. With the CLI for Microsoft 365, you can configure your tenant no matter which operating system you use. Additionally, using CLI for Microsoft 365, you can manage your SharePoint Framework projects.
 

New version of CLI for Microsoft 365 – v3.12

 
Following our monthly release cadence, we’ve released a new version of the CLI for Microsoft 365 with some new capabilities. Here are a few of the most noteworthy additions.
 

New Commands

 

We’ve continued improving the CLI, adding new commands and we've introduced in the previous version.

 

Create a bucket in a Microsoft Planner plan

 

We have added a new command that gives you the ability to create new buckets in your Microsoft Planner Plans.

 

To create a new bucket in a given plan, execute:

 

m365 planner bucket add --name "My Planner Bucket" --planName "My Planner Plan" --ownerGroupName "My Planner Group"

 

Retrieve buckets from a Microsoft Planner plan

 

We have added a new command that gives you the ability list the existing buckets in a given Microsoft Planner Plan.

 

To retrieve information about buckets in a given plan, execute:

 

m365 planner bucket list --planName "My Plan" --ownerGroupName "My Group"

 

Retrieve a list of Microsoft Planner plans

 

We have added a new command that gives you the ability list the Microsoft Planner plans associated with a given Microsoft 365 Group.

 

To retrieve information about the plans in a given group, execute:

 

m365 planner plan list --ownerGroupName "My Planner Group"

 

List OneDrive sites

 

We have added a new command that gives you the ability to list information about all of the OneDrive sites in a Microsoft 365 tenant.

 

To retrieve a list of OneDrive sites, execute:

 

m365 onedrive list

 

cli doctor

 

We have introduced a new command that to make it easier for you to provide all the necessary diagnostic information needed to triage and debug CLI issues without exposing any security-sensitive details.

 

To retrieve diagnostic information about the current environment, execute:

 

m365 cli doctor

 

Changes

 
We’ve continued improving the CLI, building upon the changes we’ve introduced in the previous version.
 

Upgraded commands to use Microsoft Graph v1.0 endpoints

 
When new capabilities are added to the Microsoft Graph they are usually added to the beta endpoint, this is to give developers early access to new capabilities however this is based on an assumption that these endpoints are subject to change until they reach general availability where they are added to the v1.0 endpoint.
 
Sometimes when we add new commands to the CLI for Microsoft 365 we make use of beta endpoints to add new capabilities to the CLI, for example, we recently added several Microsoft To Do commands that used the beta endpoints when they were initially released.
 
Over time however these endpoints have matured, reaching general availability and are now available in the v1.0 endpoint, therefore we have updated our code to reflect this.
 
We have updated the following commands in this version of the CLI to use v1.0 endpoints.
  • teams user app list
  • teams channel get

 

Project upgrade support for latest SharePoint Framework developer preview

 

The spfx project upgrade command has been updated to support the latest developer preview versions.

 

Starting with SharePoint Framework (SPFx) v1.12, developers can try preview releases of new SPFx generator packages as part of a developer preview.

 

This release adds the ability to upgrade SharePoint Framework projects to version 1.13.0-beta.15 which previews Viva Connections extensibility with Adaptive Card Extensions.

 

To generate instructions for upgrading to the latest preview version, execute:

 

m365 spfx project upgrade --preview

 

Retrieve Associated Groups of a site 

 

The spo web get command can be used to return information about a given site, previously this did not include returning information about its associated groups such as Owners, Members and Visitors groups however in this release we have updated the command to return this information.

 

To retrieve information about a given site along with it's associated groups, execute:

 

m365 spo web get --webUrl https://contoso.sharepoint.com/subsite --withGroups

New script samples

 

CLI for Microsoft 365 is a great tool both for quick adjustments to the configuration of your Microsoft 365 tenant as well as automating more complex tasks. Because CLI for Microsoft 365 is cross-platform you can use it on any OS and in any shell. To help you get started using the CLI for Microsoft 365 for automation scenarios, we started gathering some sample scripts.

 

If you have any scripts that you use frequently, please share them with us so that we can learn more about the common automation scenarios.
 

Add multiple lists in multiple sites

 

When provisioning lists in SharePoint Online, sometimes we want to replicate the same list across multiple site collections.
 
This script will create multiple lists in multiple sites, including also mapping a content type to the created lists.
 

Identify failed Site Designs executions

 
When people in your organization create new SharePoint sites, you often need to ensure some level of consistency. For example, you may need proper branding and theming applied to each new site when they are created, Site Designs enable to run scripts and code automatically on the creation of those sites.
 
This script will iterate through all site collections in the tenant and returns a list of site design executions that have errors.
 

List number of files in all lists and folders in a site

When carrying out migrations it is useful to understand the number of files in a given site and where they are before moving files to a new location.
 
This script will iterate over all lists, folders and subfolders in a given site and return the item count for each.
 

Contributors

 

This release wouldn’t be possible without the help of (in alphabetical order)
 

 

Thank you all for the time you chose to spend on the CLI for Microsoft 365 and your help to advance it!

 

Work in progress

 

Here are some things that we’re currently working on.

 

More commands, what else

 

Microsoft 365 is evolving and new capabilities are being released every day. With CLI for Microsoft 365, we aim to help you manage your tenant on any platform in a consistent way, no matter which part of Microsoft 365 you interact with. While we keep adding new commands to CLI for Microsoft 365 each release, we still barely scratched the surface with what’s possible in Microsoft 365. In the upcoming versions of the CLI for Microsoft, you can expect us to add more commands across the different workloads in Microsoft 365.
 

Updating Azure AD apps

 

Recently, we introduced a command to easily create Azure AD app registrations. Because they're backbone of every app you'd build on Microsoft 365, we think you should be able to create them as easily as possible. So with CLI for Microsoft 365, you can create a fully configured Azure AD app for the most common scenarios with just one line of code.
 
We're currently working on adding support for updating Azure AD app registration which will be helpful for example when building apps for Microsoft Teams. Stay tuned!
 

Script examples

 

In every release of the CLI for Microsoft 365, we introduce new commands for managing Microsoft 365. With over 350 commands across the different Microsoft 365 services, the CLI for Microsoft 365 has become a powerful tool, not just for managing your tenant but also for automating your daily work.

 

We’d love to show you how you can use the CLI for Microsoft 365 to build automation scripts in PowerShell Core and Bash. If you have any scripts using SPO or PnP PowerShell that you use frequently, please share them with us so that we can learn more about the common automation scenarios.
 

'ensure' commands

 

Recently, we shipped our first ensure command - an easy way to help you that a site with specific settings exists. If it doesn't, CLI creates it for you, if it does, CLI ensures it has the right properties. All in one line of code. We'd love to hear from you how you like it and if it's something you'd like us to implement for other commands as well.

 

Try it today

 

Get the latest release of the CLI for Microsoft 365 from npm by executing:

 

npm i -g @pnp/cli-microsoft365

 

Alternatively, you can get the latest release from Docker by executing:

 

docker run --rm -it m365pnp/cli-microsoft365:latest

 

If you need more help getting started or want more details about the commands, the architecture or the project, go to aka.ms/cli-m365.

 

If you see any room for improvement, please, don’t hesitate to reach out to us either on GitHub or twitter.
%3CLINGO-SUB%20id%3D%22lingo-sub-2589506%22%20slang%3D%22en-US%22%3ECLI%20for%20Microsoft%20365%20v3.12%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2589506%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--405918181%22%20id%3D%22toc-hId--385813969%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22banner-cli-m365.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F298556i721EBA9B05939597%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22banner-cli-m365.png%22%20alt%3D%22CLI%20for%20Microsoft%20365%203.12%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ECLI%20for%20Microsoft%20365%203.12%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2081594652%22%20id%3D%22toc-hId-2101698864%22%3E%3CSPAN%3EManage%20Microsoft%20365%20and%20SharePoint%20Framework%20projects%20on%20any%20platform%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3ECLI%20for%20Microsoft%20365%20is%20a%20cross-platform%20CLI%20that%20allows%20you%20to%20manage%20various%20configuration%20settings%20of%20Microsoft%20365%20and%20SharePoint%20Framework%20projects%20no%20matter%20which%20operating%20system%20or%20shell%20you%20use.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EWhile%20building%20solutions%20for%20Microsoft%20365%20expands%20beyond%20the%20Windows%20operating%20system%2C%20managing%20many%20of%20the%20platform%20settings%20is%20possible%20only%20through%20PowerShell%20on%20Windows.%20As%20more%20and%20more%20users%20work%20on%20non-Windows%20machines%2C%20it%E2%80%99s%20inconvenient%20for%20them%20to%20have%20to%20use%20a%20Windows%20virtual%20machine%20to%20configure%20their%20tenants.%20With%20the%20CLI%20for%20Microsoft%20365%2C%20you%20can%20configure%20your%20tenant%20no%20matter%20which%20operating%20system%20you%20use.%20Additionally%2C%20using%20CLI%20for%20Microsoft%20365%2C%20you%20can%20manage%20your%20SharePoint%20Framework%20projects.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc-hId-274140189%22%20id%3D%22toc-hId-294244401%22%3ENew%20version%20of%20CLI%20for%20Microsoft%20365%20%E2%80%93%20v3.12%3C%2FH2%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3EFollowing%20our%20monthly%20release%20cadence%2C%20we%E2%80%99ve%20released%20a%20new%20version%20of%20the%20CLI%20for%20Microsoft%20365%20with%20some%20new%20capabilities.%20Here%20are%20a%20few%20of%20the%20most%20noteworthy%20additions.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId-1543689684%22%20id%3D%22toc-hId-964701663%22%20id%3D%22toc-hId-984805875%22%3E%3CSPAN%3ENew%20Commands%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWe%E2%80%99ve%20continued%20improving%20the%20CLI%2C%20adding%20new%20commands%20and%20we've%20introduced%20in%20the%20previous%20version.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1655263137%22%20id%3D%22toc-hId-1675367349%22%3E%3CSPAN%3ECreate%20a%20bucket%20in%20a%20Microsoft%20Planner%20plan%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWe%20have%20added%20a%20new%20command%20that%20gives%20you%20the%20ability%20to%20create%20new%20buckets%20in%20your%20Microsoft%20Planner%20Plans.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20create%20a%20new%20bucket%20in%20a%20given%20plan%2C%20execute%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20planner%20bucket%20add%20--name%20%3CSPAN%20class%3D%22s2%22%3E%22My%20Planner%20Bucket%22%3C%2FSPAN%3E%20--planName%20%3CSPAN%20class%3D%22s2%22%3E%22My%20Planner%20Plan%22%3C%2FSPAN%3E%20--ownerGroupName%20%3CSPAN%20class%3D%22s2%22%3E%22My%20Planner%20Group%22%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--152191326%22%20id%3D%22toc-hId--132087114%22%3E%3CSPAN%3ERetrieve%20buckets%20from%20a%26nbsp%3BMicrosoft%20Planner%20plan%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWe%20have%20added%20a%20new%20command%20that%20gives%20you%20the%20ability%20list%20the%20existing%20buckets%20in%20a%20given%20Microsoft%20Planner%20Plan.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20retrieve%20information%20about%20buckets%20in%20a%20given%20plan%2C%20execute%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20planner%20bucket%20list%20--planName%20%3CSPAN%20class%3D%22s2%22%3E%22My%20Plan%22%3C%2FSPAN%3E%20--ownerGroupName%20%3CSPAN%20class%3D%22s2%22%3E%22My%20Group%22%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1959645789%22%20id%3D%22toc-hId--1939541577%22%3ERetrieve%20a%20list%20of%20Microsoft%20Planner%20plans%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWe%20have%20added%20a%20new%20command%20that%20gives%20you%20the%20ability%20list%20the%20Microsoft%20Planner%20plans%20associated%20with%20a%20given%20Microsoft%20365%20Group.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20retrieve%20information%20about%20the%20plans%20in%20a%20given%20group%2C%20execute%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20planner%20plan%20list%20--ownerGroupName%20%3CSPAN%20class%3D%22s2%22%3E%22My%20Planner%20Group%22%3C%2FSPAN%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-527867044%22%20id%3D%22toc-hId-547971256%22%3EList%20OneDrive%20sites%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EWe%20have%20added%20a%20new%20command%20that%20gives%20you%20the%20ability%20to%20list%20information%20about%20all%20of%20the%20OneDrive%20sites%20in%20a%20Microsoft%20365%20tenant.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20retrieve%20a%20list%20of%20OneDrive%20sites%2C%20execute%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20onedrive%20list%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1279587419%22%20id%3D%22toc-hId--1259483207%22%3Ecli%20doctor%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20have%20introduced%20a%20new%20command%20that%20to%20make%20it%20easier%20for%20you%20to%20provide%26nbsp%3B%3CSPAN%3Eall%20the%20necessary%20diagnostic%20information%20needed%20to%20triage%20and%20debug%20CLI%20issues%20without%20exposing%20any%20security-sensitive%20details.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20retrieve%26nbsp%3Bdiagnostic%20information%20about%20the%20current%20environment%2C%20execute%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20cli%20doctor%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CH3%20id%3D%22toc-hId-183572944%22%20id%3D%22toc-hId--1290090523%22%20id%3D%22toc-hId--1269986311%22%3E%3CSPAN%3EChanges%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EWe%E2%80%99ve%20continued%20improving%20the%20CLI%2C%20building%20upon%20the%20changes%20we%E2%80%99ve%20introduced%20in%20the%20previous%20version.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%0A%3CH4%20id%3D%22toc-hId-631341550%22%20id%3D%22toc-hId-651445762%22%3EUpgraded%20commands%20to%20use%20Microsoft%20Graph%20v1.0%20endpoints%3C%2FH4%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EWhen%20new%20capabilities%20are%20added%20to%20the%20Microsoft%20Graph%20they%20are%20usually%20added%20to%20the%20beta%20endpoint%2C%20this%20is%20to%20give%20developers%20early%20access%20to%20new%20capabilities%20however%20this%20is%20based%20on%20an%20assumption%20that%20these%20endpoints%20are%20subject%20to%20change%20until%20they%20reach%20general%20availability%20where%20they%20are%20added%20to%20the%20v1.0%20endpoint.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CDIV%3ESometimes%20when%20we%20add%20new%20commands%20to%20the%20CLI%20for%20Microsoft%20365%20we%20make%20use%20of%20beta%20endpoints%20to%20add%20new%20capabilities%20to%20the%20CLI%2C%20for%20example%2C%20we%20recently%20added%20several%20Microsoft%20To%20Do%20commands%20that%20used%20the%20beta%20endpoints%20when%20they%20were%20initially%20released.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EOver%20time%20however%20these%20endpoints%20have%20matured%2C%20reaching%20general%20availability%20and%20are%20now%20available%20in%20the%20v1.0%20endpoint%2C%20therefore%20we%20have%20updated%20our%20code%20to%20reflect%20this.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EWe%20have%20updated%20the%20following%20commands%20in%20this%20version%20of%20the%20CLI%20to%20use%20v1.0%20endpoints.%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3Eteams%20user%20app%20list%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3Eteams%20channel%20get%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--1176112913%22%20id%3D%22toc-hId--1156008701%22%3EProject%20upgrade%20support%20for%20latest%20SharePoint%20Framework%20developer%20preview%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%26nbsp%3B%3CEM%3Espfx%20project%20upgrade%3C%2FEM%3E%20command%20has%20been%20updated%20to%20support%20the%20latest%20developer%20preview%20versions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EStarting%20with%20SharePoint%20Framework%20(SPFx)%20v1.12%2C%20developers%20can%20try%20preview%20releases%20of%20new%20SPFx%20generator%20packages%20as%20part%20of%20a%20developer%20preview.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20release%20adds%20the%20ability%20to%20upgrade%20SharePoint%20Framework%20projects%20to%20version%201.13.0-beta.15%20which%20previews%20Viva%20Connections%20extensibility%20with%20Adaptive%20Card%20Extensions.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20generate%20instructions%20for%20upgrading%20to%20the%20latest%20preview%20version%2C%20execute%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20spfx%20project%20upgrade%20--preview%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1311399920%22%20id%3D%22toc-hId-1331504132%22%3E%3CSPAN%3ERetrieve%20Associated%20Groups%20of%20a%20site%26nbsp%3B%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%20%3CEM%3Espo%20web%20get%3C%2FEM%3E%20command%20can%20be%20used%20to%20return%20information%20about%20a%20given%20site%2C%26nbsp%3Bpreviously%20this%20did%20not%20include%20returning%20information%20about%20its%20associated%20groups%20such%20as%20Owners%2C%20Members%20and%20Visitors%20groups%20however%20in%20this%20release%20we%20have%20updated%20the%20command%20to%26nbsp%3Breturn%20this%20information.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETo%20retrieve%26nbsp%3Binformation%20about%20a%20given%20site%26nbsp%3Balong%20with%20it's%20associated%20groups%2C%20execute%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Em365%20spo%20web%20get%20--webUrl%20https%3A%2F%2Fcontoso.sharepoint.com%2Fsubsite%20--withGroups%3C%2FPRE%3E%0A%3CH3%20id%3D%22toc-hId--2071219242%22%20id%3D%22toc-hId--625137262%22%20id%3D%22toc-hId--605033050%22%3E%3CSPAN%3ENew%20script%20samples%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ECLI%20for%20Microsoft%20365%20is%20a%20great%20tool%20both%20for%20quick%20adjustments%20to%20the%20configuration%20of%20your%20Microsoft%20365%20tenant%20as%20well%20as%20automating%20more%20complex%20tasks.%20Because%20CLI%20for%20Microsoft%20365%20is%20cross-platform%20you%20can%20use%20it%20on%20any%20OS%20and%20in%20any%20shell.%20To%20help%20you%20get%20started%20using%20the%20CLI%20for%20Microsoft%20365%20for%20automation%20scenarios%2C%20we%20started%20gathering%20some%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%3Esample%20scripts%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EIf%20you%20have%20any%20scripts%20that%20you%20use%20frequently%2C%20please%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fcli-microsoft365%2Fissues%2Fnew%3Fassignees%3D%26amp%3Blabels%3D%26amp%3Btemplate%3Dsample.md%26amp%3Btitle%3DNew%2Bsample%2Bscript%253A%2B%253Cshort%2Bdescription%253E%22%20target%3D%22_self%22%20rel%3D%22noreferrer%20noopener%22%3E%3CSPAN%3Eshare%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%26nbsp%3Bthem%20with%20us%20so%20that%20we%20can%20learn%20more%20about%20the%20common%20automation%20scenarios.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId-1991458290%22%20id%3D%22toc-hId-2011562502%22%3E%3CSPAN%3EAdd%20multiple%20lists%20in%20multiple%20sites%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3EWhen%20provisioning%20lists%20in%20SharePoint%20Online%2C%20sometimes%20we%20want%20to%20replicate%20the%20same%20list%20across%20multiple%20site%20collections.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EThis%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2Fspo%2Fadd-multiple-lists-in-multiple-sites%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noreferrer%20noopener%22%3Escript%3C%2FA%3E%20will%20create%20multiple%20lists%20in%20multiple%20sites%2C%20including%20also%20mapping%20a%20content%20type%20to%20the%20created%20lists.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId-184003827%22%20id%3D%22toc-hId-204108039%22%3E%3CSPAN%3EIdentify%20failed%20Site%20Designs%20executions%3C%2FSPAN%3E%3C%2FH4%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EWhen%20people%20in%20your%20organization%20create%20new%20SharePoint%20sites%2C%20you%20often%20need%20to%20ensure%20some%20level%20of%20consistency.%20For%20example%2C%20you%20may%20need%20proper%20branding%20and%20theming%20applied%20to%20each%20new%20site%20when%20they%20are%20created%2C%20Site%20Designs%20enable%20to%20run%20scripts%20and%20code%26nbsp%3Bautomatically%20on%20the%20creation%20of%20those%20sites.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EThis%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2Fspo%2Flist-failed-sitedesigns%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Escript%3C%2FA%3E%20will%26nbsp%3Biterate%20through%20all%20site%20collections%20in%20the%20tenant%20and%20returns%20a%20list%20of%20site%20design%20executions%20that%20have%20errors.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH4%20id%3D%22toc-hId--1623450636%22%20id%3D%22toc-hId--1603346424%22%3EList%20number%20of%20files%20in%20all%20lists%20and%20folders%20in%20a%20site%3C%2FH4%3E%0A%3CDIV%3EWhen%20carrying%20out%20migrations%20it%20is%20useful%20to%20understand%20the%20number%20of%20files%20in%20a%20given%20site%20and%20where%20they%20are%20before%20moving%20files%20to%20a%20new%20location.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3EThis%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fsample-scripts%2Fspo%2Flist-all-list-folders-itemcount%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Escript%3C%2FA%3E%20will%20iterate%20over%20all%20lists%2C%20folders%20and%20subfolders%20in%20a%20given%20site%20and%20return%20the%20item%20count%20for%20each.%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CH3%20id%3D%22toc-hId-962667237%22%20id%3D%22toc-hId-734979478%22%20id%3D%22toc-hId-755083690%22%3E%3CSPAN%3EContributors%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EThis%20release%20wouldn%E2%80%99t%20be%20possible%20without%20the%20help%20of%20(in%20alphabetical%20order)%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Faakashbhardwaj619%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EAakash%20Bhardwaj%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fvipulkelkar%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EVipul%20Kelkar%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fsudharsank%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3ESudharsan%26nbsp%3BKesavanarayanan%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fktskumar%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EShantha%20Kumar%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fplamber%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EPatrick%20Lamber%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwaldekmastykarz%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EWaldek%20Mastykarz%3C%2FA%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Farjunumenon%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EArjun%20Menon%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAbderahman88%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EAbderahman%20Moujahid%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fappieschot%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EAlbert%20Jan-Schot%3C%2FA%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fdips365%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EDipen%20Shah%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Frabwill%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3ERabia%20Williams%3C%2FSPAN%3E%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThank%20you%20all%20for%20the%20time%20you%20chose%20to%20spend%20on%20the%20CLI%20for%20Microsoft%20365%20and%20your%20help%20to%20advance%20it!%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--844787226%22%20id%3D%22toc-hId--1201557704%22%20id%3D%22toc-hId--1181453492%22%3E%3CSPAN%3EWork%20in%20progress%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EHere%20are%20some%20things%20that%20we%E2%80%99re%20currently%20working%20on.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1771808326%22%20id%3D%22toc-hId-1415037848%22%20id%3D%22toc-hId-1435142060%22%3E%3CSPAN%3EMore%20commands%2C%20what%20else%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EMicrosoft%20365%20is%20evolving%20and%20new%20capabilities%20are%20being%20released%20every%20day.%20With%20CLI%20for%20Microsoft%20365%2C%20we%20aim%20to%20help%20you%20manage%20your%20tenant%20on%20any%20platform%20in%20a%20consistent%20way%2C%20no%20matter%20which%20part%20of%20Microsoft%20365%20you%20interact%20with.%20While%20we%20keep%20adding%20new%20commands%20to%20CLI%20for%20Microsoft%20365%20each%20release%2C%20we%20still%20barely%20scratched%20the%20surface%20with%20what%E2%80%99s%20possible%20in%20Microsoft%20365.%20In%20the%20upcoming%20versions%20of%20the%20CLI%20for%20Microsoft%2C%20you%20can%20expect%20us%20to%20add%20more%20commands%20across%20the%20different%20workloads%20in%20Microsoft%20365.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId--1843100600%22%20id%3D%22toc-hId-305745326%22%20id%3D%22toc-hId-325849538%22%3E%3CSPAN%3EUpdating%20Azure%20AD%20apps%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ERecently%2C%20we%20introduced%20a%20command%20to%20easily%20create%20Azure%20AD%20app%20registrations.%20Because%20they're%20backbone%20of%20every%20app%20you'd%20build%20on%20Microsoft%20365%2C%20we%20think%20you%20should%20be%20able%20to%20create%20them%20as%20easily%20as%20possible.%20So%20with%20CLI%20for%20Microsoft%20365%2C%20you%20can%20create%20a%20fully%20configured%20Azure%20AD%20app%20for%20the%20most%20common%20scenarios%20with%20just%20one%20line%20of%20code.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EWe're%20currently%20working%20on%20adding%20support%20for%20updating%20Azure%20AD%20app%20registration%20which%20will%20be%20helpful%20for%20example%20when%20building%20apps%20for%20Microsoft%20Teams.%20Stay%20tuned!%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId-644412233%22%20id%3D%22toc-hId--1501709137%22%20id%3D%22toc-hId--1481604925%22%3E%3CSPAN%3EScript%20examples%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EIn%20every%20release%20of%20the%20CLI%20for%20Microsoft%20365%2C%20we%20introduce%20new%20commands%20for%20managing%20Microsoft%20365.%20With%20over%20350%20commands%20across%20the%20different%20Microsoft%20365%20services%2C%20the%20CLI%20for%20Microsoft%20365%20has%20become%20a%20powerful%20tool%2C%20not%20just%20for%20managing%20your%20tenant%20but%20also%20for%20automating%20your%20daily%20work.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EWe%E2%80%99d%20love%20to%20show%20you%20how%20you%20can%20use%20the%20CLI%20for%20Microsoft%20365%20to%20build%20automation%20scripts%20in%20PowerShell%20Core%20and%20Bash.%20If%20you%20have%20any%20scripts%20using%20SPO%20or%20PnP%20PowerShell%20that%20you%20use%20frequently%2C%20please%20share%20them%20with%20us%20so%20that%20we%20can%20learn%20more%20about%20the%20common%20automation%20scenarios.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH3%20id%3D%22toc-hId--1163042230%22%20id%3D%22toc-hId-985803696%22%20id%3D%22toc-hId-1005907908%22%3E%3CSPAN%3E'ensure'%20commands%3C%2FSPAN%3E%3C%2FH3%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3ERecently%2C%20we%20shipped%20our%20first%20ensure%20command%20-%20an%20%3CA%20href%3D%22https%3A%2F%2Fpnp.github.io%2Fcli-microsoft365%2Fcmd%2Fspo%2Fsite%2Fsite-ensure%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eeasy%20way%20to%20help%20you%20that%20a%20site%20with%20specific%20settings%20exists%3C%2FA%3E.%20If%20it%20doesn't%2C%20CLI%20creates%20it%20for%20you%2C%20if%20it%20does%2C%20CLI%20ensures%20it%20has%20the%20right%20properties.%20All%20in%20one%20line%20of%20code.%20We'd%20love%20to%20hear%20from%20you%20how%20you%20like%20it%20and%20if%20it's%20something%20you'd%20like%20us%20to%20implement%20for%20other%20commands%20as%20well.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1195387884%22%20id%3D%22toc-hId--950733486%22%20id%3D%22toc-hId--930629274%22%3E%3CSPAN%3ETry%20it%20today%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EGet%20the%20latest%20release%20of%20the%20CLI%20for%20Microsoft%20365%20from%20npm%20by%20executing%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Enpm%20i%20-g%20%40pnp%2Fcli-microsoft365%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EAlternatively%2C%20you%20can%20get%20the%20latest%20release%20from%20Docker%20by%20executing%3A%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Edocker%20run%20--rm%20-it%20m365pnp%2Fcli-microsoft365%3Alatest%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EIf%20you%20need%20more%20help%20getting%20started%20or%20want%20more%20details%20about%20the%20commands%2C%20the%20architecture%20or%20the%20project%2C%20go%20to%20%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fcli-m365%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3Eaka.ms%2Fcli-m365%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E.%20%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%3CSPAN%3EIf%20you%20see%20any%20room%20for%20improvement%2C%20please%2C%20don%E2%80%99t%20hesitate%20to%20reach%20out%20to%20us%20either%20on%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fcli-microsoft365%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%3EGitHub%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%26nbsp%3Bor%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fclimicrosoft365%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%3Etwitter%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2589506%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3ECLI%20for%20Microsoft%20365%20is%20a%20cross-platform%20CLI%20that%20allows%20you%20to%20manage%20various%20configuration%20settings%20of%20Microsoft%20365%20and%20SharePoint%20Framework%20projects%20no%20matter%20which%20operating%20system%20or%20shell%20you%20use.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2589506%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAnnouncement%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jul 30 2021 02:28 AM
Updated by: