SOLVED

Is it possible to get a list of Teams and associated Sharepoint sites?

%3CLINGO-SUB%20id%3D%22lingo-sub-124090%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124090%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20to%20get%20a%20list%20of%20all%20Teams%20and%20their%20associated%20Sharepoint%20Sites%20but%20it%20seems%20this%20is%20not%20an%20easy%20task.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20even%20Installed%20the%20new%20Teams%20PS%20module%20but%26nbsp%3Bwas%20unable%20to%20get%20a%20list%20of%20all%20Teams%2C%20all%26nbsp%3B%20I%20got%20was%20a%20list%20of%20Teams%20which%20I%20have%20access%20to%20and%20the%20issue%20is%20there%20are%20some%20Teams%20which%20are%20cannot%20be%20accessed%20even%20by%20O365%20Global%20administrators%20as%20well.%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20to%20get%20a%20list%20of%20all%20of%20those%20Teams%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20addition%2C%20wants%20the%20best%26nbsp%3Bmethod%20to%20get%20the%20associated%20Sharepoint%20site%20URL%20for%20each%20channel%20in%20a%20Team%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EDhanushka%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-124090%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124572%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124572%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20try%20PowerShell%20ISE%20but%20received%20no%20errors%2C%20it%20just%20starts%20and%20finishes%20without%20any%20output.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F64%22%20target%3D%22_blank%22%3E%40Tony%20Redmond%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20suggestions%2C%20%26nbsp%3Buntil%20we%20have%20a%20proper%20set%20of%20Teams%20PS%20commands%20I%20will%20use%20your%20suggestion.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMany%20thanks%20for%20both%20Tony%20and%20Pieter%20for%20your%20time%20and%20suggestions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETC%2C%3C%2FP%3E%3CP%3EDhanushka%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124540%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124540%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20indeed%20feels%20like%20a%20developer%20release%20rather%20than%20an%20end-user%2Fadministrator%20release.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124539%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124539%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20very%20little%20hope%20that%20something%20dramatically%20better%20will%20emerge%20in%201.0.%20That's%20not%20the%20way%20things%20usually%20happen.%20Developers%20don't%20suddenly%20say%20%22Oh%20sh*t%2C%20my%200.9%20release%20is%20absolute%20rubbish...%20I%20need%20to%20rewrite%20it%20for%20the%201.0%20release.%22%26nbsp%3B%20The%20way%20the%20world%20works%20is%20that%20they%20might%20respond%20for%202.0...%20maybe.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124537%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124537%22%20slang%3D%22en-US%22%3E%3CP%3EI%20guess%20we%20shouldn't%20forget%20that%20it%20is%20only%20a%20Beta%20release%20at%20this%20stage.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124536%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124536%22%20slang%3D%22en-US%22%3E%3CP%3EBut%20Get-Team%20doesn't%20even%20get%20all%20the%20teams%20(in%20a%20tenant).%20Unlike%20other%20cmdlets%20that%20do%20what%20you%20might%20expect%20them%20to%20do%2C%20Get-Team%20merely%20returns%20a%20list%20of%20teams%20that%20you%20belong%20to.%20If%20the%20cmdlet%20was%20called%20Get-MyTeams%2C%20it%20would%20be%20OK%2C%20but%20right%20now%20it's%20brain-dead.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124533%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124533%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F64%22%20target%3D%22_blank%22%3E%40Tony%20Redmond%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20agree%2C%20it%20doesn't%20answer%20the%20original%20question.%20I%20guess%20I%20polluted%20the%20conversation%20a%20bit%20by%20first%20getting%20all%20the%20teams.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124530%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124530%22%20slang%3D%22en-US%22%3E%3CP%3EGetting%20a%20list%20of%20teams%20that%20you%20are%20a%20member%20of%20does%20not%20answer%20the%20question.%3C%2FP%3E%3CP%3EThe%20Teams%20PowerShell%20module%20(in%20its%20current%20state)%20is%20flawed%20and%20incomplete%20and%20does%20not%20return%20the%20kind%20of%20information%20requested.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3EA%20partial%20answer%20might%20be%20to%20run%20Get-UnifiedGroup%20to%20return%20a%20list%20of%20all%20Office%20365%20Groups%20and%20look%20at%20the%20SharePoint%20URLs%20that%20are%20exposed%20there.%20While%20the%20list%20would%20include%20some%20groups%20that%20are%20not%20team-enabled%2C%20at%20least%20you'd%20be%20able%20to%20see%20all%20the%20SharePoint%20sites%20associated%20with%20Groups%20within%20the%20tenant%2C%20including%20all%20those%20used%20by%20Teams.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124527%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124527%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F60%22%20target%3D%22_blank%22%3E%40Juan%20Carlos%20Gonz%C3%A1lez%20Mart%C3%ADn%3C%2FA%3E%2C%20You%20were%20right!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fveenstra.me.uk%2F2017%2F11%2F04%2Fmicrosoft-teams-get-all-your-teams-using-powershell-part-2-resolved%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fveenstra.me.uk%2F2017%2F11%2F04%2Fmicrosoft-teams-get-all-your-teams-using-powershell-part-2-resolved%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124155%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124155%22%20slang%3D%22en-US%22%3EGive%20also%20a%20try%20to%20the%20recently%20released%20Teams%20cmdlets%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FMicrosoftTeams%2F0.9.0%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FMicrosoftTeams%2F0.9.0%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124117%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124117%22%20slang%3D%22en-US%22%3ECan%20you%20run%20it%20in%20powershell%20ISE%20and%20check%20each%20step%20if%20you%20get%20the%20right%20data%20back.%20I%20am%20picking%20the%205th%20list%20for%20example%2C%20where%20you%20might%20have%20these%20lists%20In%20a%20different%20order.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124108%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124108%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Pieter%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20the%20link%20but%20I%20m%20not%20getting%20any%20output%20from%20the%20script%20or%20any%20errors%2C%20any%20suggestions%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-Dhanushka%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-124091%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-124091%22%20slang%3D%22en-US%22%3EI%20wrote%20this%20earlier%20today%3A%20%3CA%20href%3D%22https%3A%2F%2Fveenstra.me.uk%2F2017%2F11%2F03%2Fmicrosoft-teams-get-all-your-team-sites-using-pnp-powershell%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fveenstra.me.uk%2F2017%2F11%2F03%2Fmicrosoft-teams-get-all-your-team-sites-using-pnp-powershell%2F%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2514888%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2514888%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F40851%22%20target%3D%22_blank%22%3E%40Dhanushka%20Vithanage%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20this%20is%20an%20old%20thread%3B%20but%20this%20might%20help%20someone.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEssentially%20you%20get%20a%20list%20of%20all%20teams%20groups%20and%20then%20for%20each%20of%20them%20get%20SharePoint%20site%20URL.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%23Modules%0A%24modules%3D%22PnP.Powershell%22%2C%22MicrosoftTeams%22%0Aforeach%20(%24module%20in%20%24modules)%7B%0A%20%20%20%20If%26nbsp%3B(Get-Module%26nbsp%3B%24module%26nbsp%3B-ListAvailable)%7B%0A%20%20%20%20%20%20%20%20Import-Module%26nbsp%3B%24module%26nbsp%3B-DisableNameChecking%26nbsp%3B-ErrorAction%26nbsp%3BSilentlyContinue%0A%20%20%20%20%20%20%20%20Write-Host%26nbsp%3B%22%24module%26nbsp%3BModule%26nbsp%3Bimported%22%26nbsp%3B-ForegroundColor%20Green%0A%20%20%20%20%7D%0A%20%20%20%20else%7B%0A%20%20%20%20%20%20%20%20Install-Module%26nbsp%3B%24module%26nbsp%3B-Force%26nbsp%3B-ErrorAction%26nbsp%3BStop%0A%20%20%20%20%7D%0A%7D%0A%0A%23connect%20to%20SharePoint%0A%24adminUPN%20%3D%20%22%3CSHAREPOINT%20admin%3D%22%22%20email%3D%22%22%3E%22%0A%24cred%20%3D%20Get-Credential%20-UserName%20%24adminUPN%20-Message%20%22Type%20the%20password.%22%0AConnect-SPOService%20-Url%20https%3A%2F%2F%3CTENANT%3E-admin.sharepoint.com%20-Credential%20%24cred%0A%0A%23Connect%20to%20Teams%0AConnect-MicrosoftTeams%0A%0A%23Get%20all%20MSTeams%20in%20tenenat%0A%24TeamGroups%3DGet-Team%20%7C%20select%20DisplayName%0A%24siteMaster%3D%40()%0A%24SPSites%3DGet-SPOSite%20-Limit%20all%20%7C%20sort%20url%0A%0A%23Get%20SP%20URL%20for%20each%20of%20those%20teams%20groups%0A%24TeamGroups%20%7C%20%25%7B%0A%20%20%20%20%24DisplayName%20%3D%20%24_.DisplayName%0A%20%20%20%20%24siteMaster%20%2B%3D%20%24SPSites%20%7C%20%3F%7B%24_.title%20-like%20%24DisplayName%7D%0A%7D%0A%24siteMaster%20%7C%20Export-Csv%20-Path%20%24env%3AUSERPROFILE%5CDesktop%5CTeamsSPSites.csv%20-NoTypeInformation%3C%2FTENANT%3E%3C%2FSHAREPOINT%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2514948%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2514948%22%20slang%3D%22en-US%22%3EThere%20is%20an%20easier%20way%20to%20get%20a%20list%20of%20all%20teams%20and%20their%20SharePoint%20urls%20using%20exchange's%20unified%20group%20command%20as%20well%20%3A%3CBR%20%2F%3Eget-unifiedgroup%20-resultsize%20unlimited%20%7C%20select%20Displayname%2C%20Primarysmtpaddress%2CResourceProvisioningoptions%2Csharepointsiteurl%20%7C%20export-csv%20o365groupsNamesonlyOnceAgain.csv%20-nti%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20output%20excel%20sheet%20contains%20a%20column%20'resource%20provisioning%20options'%20which%20will%20read%20'Teams'%20if%20an%20office%20365%20group%20was%20provisioned%20due%20to%20creation%20of%20a%20corresponding%20Team.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2515583%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2515583%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F658757%22%20target%3D%22_blank%22%3E%40SheldonFaria%3C%2FA%3E%26nbsp%3BThere's%20a%20much%20simpler%20two-line%20solution%20using%20the%20Get-UnifiedGroup%20cmdlet.%20It's%20written%20up%20in%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3CSTRONG%3EHow%20to%20Generate%20a%20Report%20of%20Teams%20and%20Their%20SharePoint%20Online%20Sites%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EHow%20do%20you%20create%20a%20report%20of%20all%20the%20Teams%20in%20a%20tenant%20and%20their%20SharePoint%20Online%20sites%3F%20As%20it%20turns%20out%2C%20a%20two-line%20script%20does%20the%20job.%20We%20make%20the%20script%20slightly%20prettier%2C%20but%20it%E2%80%99s%20still%20simple.%20And%20because%20it%E2%80%99s%20PowerShell%2C%20anyone%20can%20change%20the%20code%20to%20make%20it%20work%20the%20way%20they%20want%20it%20to.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Foffice365itpros.com%2F2021%2F07%2F05%2Freport-teams-sharepoint-sites%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Foffice365itpros.com%2F2021%2F07%2F05%2Freport-teams-sharepoint-sites%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2521373%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20a%20list%20of%20Teams%20and%20associated%20Sharepoint%20sites%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2521373%22%20slang%3D%22en-US%22%3Ethanks%20Harveer%20and%20Tony.%20Completely%20agree%2C%20much%20neater%20solution.%3C%2FLINGO-BODY%3E
Contributor

Hello All,

 

I need to get a list of all Teams and their associated Sharepoint Sites but it seems this is not an easy task.

 

I even Installed the new Teams PS module but was unable to get a list of all Teams, all  I got was a list of Teams which I have access to and the issue is there are some Teams which are cannot be accessed even by O365 Global administrators as well.

Is there any way to get a list of all of those Teams?

 

In addition, wants the best method to get the associated Sharepoint site URL for each channel in a Team?

 

Thanks,

Dhanushka

 

16 Replies

Hi Pieter,

 

Thanks for the link but I m not getting any output from the script or any errors, any suggestions?

 

-Dhanushka

Can you run it in powershell ISE and check each step if you get the right data back. I am picking the 5th list for example, where you might have these lists In a different order.
best response confirmed by Dhanushka Vithanage (Contributor)
Solution

Getting a list of teams that you are a member of does not answer the question.

The Teams PowerShell module (in its current state) is flawed and incomplete and does not return the kind of information requested.  

A partial answer might be to run Get-UnifiedGroup to return a list of all Office 365 Groups and look at the SharePoint URLs that are exposed there. While the list would include some groups that are not team-enabled, at least you'd be able to see all the SharePoint sites associated with Groups within the tenant, including all those used by Teams.

Hi @Tony Redmond,

 

I agree, it doesn't answer the original question. I guess I polluted the conversation a bit by first getting all the teams. 

But Get-Team doesn't even get all the teams (in a tenant). Unlike other cmdlets that do what you might expect them to do, Get-Team merely returns a list of teams that you belong to. If the cmdlet was called Get-MyTeams, it would be OK, but right now it's brain-dead.

I guess we shouldn't forget that it is only a Beta release at this stage. 

I have very little hope that something dramatically better will emerge in 1.0. That's not the way things usually happen. Developers don't suddenly say "Oh sh*t, my 0.9 release is absolute rubbish... I need to rewrite it for the 1.0 release."  The way the world works is that they might respond for 2.0... maybe.

It indeed feels like a developer release rather than an end-user/administrator release. 

@Pieter Veenstra

 

I did try PowerShell ISE but received no errors, it just starts and finishes without any output.

 

@Tony Redmond

 

Thanks for the suggestions,  until we have a proper set of Teams PS commands I will use your suggestion.

 

 

Many thanks for both Tony and Pieter for your time and suggestions.

 

TC,

Dhanushka

@Dhanushka Vithanage 

 

I know this is an old thread; but this might help someone. 

 

Essentially you get a list of all teams groups and then for each of them get SharePoint site URL.

 

#Modules
$modules="PnP.Powershell","MicrosoftTeams"
foreach ($module in $modules){
    If (Get-Module $module -ListAvailable){
        Import-Module $module -DisableNameChecking -ErrorAction SilentlyContinue
        Write-Host "$module Module imported" -ForegroundColor Green
    }
    else{
        Install-Module $module -Force -ErrorAction Stop
    }
}

#connect to SharePoint
$adminUPN = "<SharePoint admin email>"
$cred = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://<tenant>-admin.sharepoint.com -Credential $cred

#Connect to Teams
Connect-MicrosoftTeams

#Get all MSTeams in tenenat
$TeamGroups=Get-Team | select DisplayName
$siteMaster=@()
$SPSites=Get-SPOSite -Limit all | sort url

#Get SP URL for each of those teams groups
$TeamGroups | %{
    $DisplayName = $_.DisplayName
    $siteMaster += $SPSites | ?{$_.title -like $DisplayName}
}
$siteMaster | Export-Csv -Path $env:USERPROFILE\Desktop\TeamsSPSites.csv -NoTypeInformation

 

There is an easier way to get a list of all teams and their SharePoint urls using exchange's unified group command as well :
get-unifiedgroup -resultsize unlimited | select Displayname, Primarysmtpaddress,ResourceProvisioningoptions,sharepointsiteurl | export-csv o365groupsNamesonlyOnceAgain.csv -nti

The output excel sheet contains a column 'resource provisioning options' which will read 'Teams' if an office 365 group was provisioned due to creation of a corresponding Team.

@SheldonFaria There's a much simpler two-line solution using the Get-UnifiedGroup cmdlet. It's written up in

 

How to Generate a Report of Teams and Their SharePoint Online Sites

How do you create a report of all the Teams in a tenant and their SharePoint Online sites? As it turns out, a two-line script does the job. We make the script slightly prettier, but it’s still simple. And because it’s PowerShell, anyone can change the code to make it work the way they want it to.

 

https://office365itpros.com/2021/07/05/report-teams-sharepoint-sites/

thanks Harveer and Tony. Completely agree, much neater solution.