This post will explore connecting a new Microsoft 365 group with an existing SharePoint Online site using M365 CLI. In a previous post, I explained how to do this using the SPO Management PowerShell and the PnP PowerShell module.
In the M365 CLI, we can use the spo-site-groupify command to connect an existing site with a new Microsoft 365 group. Ensure that you have installed the latest version of M365 CLI
m365 login$siteUrl = "https://<tenantname>.sharepoint.com/sites/site1"$groupName = "Group1"$mailNickname = "Group1"m365 spo site groupify --url $siteUrl --alias $mailNickname --displayName $groupName
Thank you for reading
/Simon