How to create a Microsoft Team's General folder programmatically?
-
29-01-2021 - |
Question
When I Team enable an existing Office 365 group via the New-Team
cmdlet, the General folder in Shared Documents is not created automatically. I have to open Microsoft Teams and navigate to "Files" for it to generate. Is there a way to generate the folder programmatically?
We are using this to migrate existing SharePoint on premise sites to Microsoft Teams. We would like to remap Shared Documents to the general folder.
Solution
If you use new-PnpFolder
to create a General folder before setting the Team via New-Team
, it will add the team to the existing channel. Any documents that are added to that folder will show up in the Team even those added before the New-Team
cmdlet is run or added to the Team before anyone visits the general channel in the Teams App.