How to create a team in Microsoft Teams from an existing SharePoint Online modern team site (connected to Office 365 group) using PowerShell.
I have created a modern team site (connected to an Office 365 group) and created multiple document libraries and lists in the site. I want to create a Team in Microsoft Teams using this site so that files will be shared in this SharePoint site instead of creating a new site and also, I can have the same site structure (document libraries, lists etc.) which was already created.
- # Input Parameters
- $siteURL="https://c986.sharepoint.com/sites/ukcommunicationsitedemo"
- $tenantURL="https://c986-admin.sharepoint.com"
- $credential = Get-Credential
- ## Connect to Microsoft Teams
- Connect-MicrosoftTeams -Credential $credential
- ## Connectto SharePoint Online Service
- Connect-SPOService -Url $tenantURL -Credential $credential
- $site = Get-SPOSite -Identity $siteURL
- ## Create a new Team
- New-Team -GroupId $site.GroupId.Guid
No comments:
Post a Comment