New teams I create as an admin but not owner show up as my teams

%3CLINGO-SUB%20id%3D%22lingo-sub-1543496%22%20slang%3D%22en-US%22%3ENew%20teams%20I%20create%20as%20an%20admin%20but%20not%20owner%20show%20up%20as%20my%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1543496%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20a%20global%20admin%20in%20my%20organization%20and%20we've%20turned%20off%20our%20users'%20ability%20to%20create%20teams.%20(We%20noticed%20that%20too%20many%20teams%20were%20being%20created%20for%20things%20like%20one%20on%20one%20conversations%20and%20training%20wasn't%20help)...%20To%20create%20a%20team%2C%20I%20use%20a%20script%20in%20Powershell%20that%20allows%20me%20to%20do%20it%20in%20less%20than%202%20minutes%2C%20but%20I've%20noticed%20that%20each%20team%20I%20create%20end%20up%20in%20my%20own%20Teams%20pane%20in%20the%20web%20and%20desktop%20clients%2C%20even%20if%20I'm%20not%20an%20owner%20or%20member%20of%20the%20team.%20I%20create%20at%20least%20a%20team%20a%20week%2C%20so%20it's%20a%20bit%20frustrating%20to%20have%20this%20many%20teams%20in%20my%20Teams%20pane.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can't%20clear%20them%20out.%20When%20I%20try%20to%20access%20the%20teams'%20general%20channel%2C%20they%20disappear%2C%20but%20then%20come%20back%20after%20a%20few%20minutes.%20Has%20anyone%20experienced%20this%3F%20Am%20I%20creating%20the%20teams%20incorrectly%3F%20I%20added%20a%20screenshot%20of%20the%20Teams%20pane%20for%20reference.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1543496%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdministrator%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1544167%22%20slang%3D%22en-US%22%3ERe%3A%20New%20teams%20I%20create%20as%20an%20admin%20but%20not%20owner%20show%20up%20as%20my%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1544167%22%20slang%3D%22en-US%22%3E%3CP%3EA%20team%20needs%20an%20owner%2C%20if%20you%20don't%20specify%20one%20via%20the%20-Owner%20switch%20when%20running%20New-Team%2C%20the%20person%20running%20the%20cmdlet%20will%20be%20added%20as%20owner.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1544177%22%20slang%3D%22en-US%22%3ERe%3A%20New%20teams%20I%20create%20as%20an%20admin%20but%20not%20owner%20show%20up%20as%20my%20teams%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1544177%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3BThank%20you%20for%20the%20response%2C%20but%20I%20require%20that%202%20owners%20be%20designated%20for%20every%20team%20I%20create.%20Example%20of%20the%20script%20is%20below%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%23%20Enter%20team%20info%20here%3A%0A%24DisplayName%20%3D%20'TST%20-%20Test%207'%0A%24Description%20%3D%20'Test%20teams%20capabilities%20-%207.'%0A%24MailNickName%20%3D%20'tm-tst-test_7'%0A%24Owner1%20%3D%20'test.user%40company.com'%0A%24Owner2%20%3D%20'test.user5%40company.com'%0A%24Visibility%20%3D%20'Private'%0A%0A%23%20Enter%20team%20members%20here%3A%0A%24Members%20%3D%20'test.user1%40company.com'%2C'test.user2%40company.com'%2C'test.user3%40company.com'%2C'test.user4%40company.com'%2C'test.user13%40company.com'%20-split%20'%2C'%0A%0A%23%20Team%20is%20created%20here%3A%0A%24newTeam%20%3D%20New-Team%20-DisplayName%20%24DisplayName%20-Description%20%24Description%20-Visibility%20%24Visibility%20-MailNickName%20%24MailNickName%20-Owner%20%24Owner1%0A%20%20Add-TeamUser%20-GroupId%20%24newTeam.groupID%20-User%20%24Owner2%20-Role%20Owner%0A%0A%23%20Members%20are%20added%20here%3A%0A%20foreach(%24member%20in%20%24Members)%7B%0A%20%0A%20%20%20%20%20%20%20%20Add-TeamUser%20-GroupId%20%24newTeam.GroupId%20-User%20%24member%20-Role%20Member%0A%0A%20%20%20%20%20%20%20%20%7D%0A%0A%0A%23%20Confirm%20team%20is%20created%20here%3A%0A%0A%20%20%24TeamCreated%20%3D%20%24(try%20%7BGet-Team%20-GroupId%20%24newTeam.GroupId%7D%20catch%20%7B%24Null%7D)%0AIf%20(%24TeamCreated%20-ne%20%24Null)%20%7B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20Write-Host%20%24DisplayName%20'team%20has%20been%20created.'%20-ForegroundColor%20Cyan%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20Get-Team%20-DisplayName%20%24newTeam.DisplayName%20%7C%20Select%20DisplayName%2C%20Description%2C%20mailNickname%0A%20%20%20%20%20%20%20%20%20%20%20%20Get-TeamUser%20-GroupId%20%24newTeam.GroupId%20%7C%20ft%0A%20%20%20%20%20%20%20%20%20%20%20%7D%20%0A%0A%0Aelse%20%7B%0A%0A%20%20%20%20Write-Host%20'Womp%2C%20Womp...%20Error.%20%24DisplayName%20was%20not%20created.'%20-ForegroundColor%20Red%0A%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

 

I'm a global admin in my organization and we've turned off our users' ability to create teams. (We noticed that too many teams were being created for things like one on one conversations and training wasn't help)... To create a team, I use a script in Powershell that allows me to do it in less than 2 minutes, but I've noticed that each team I create end up in my own Teams pane in the web and desktop clients, even if I'm not an owner or member of the team. I create at least a team a week, so it's a bit frustrating to have this many teams in my Teams pane.

 

I can't clear them out. When I try to access the teams' general channel, they disappear, but then come back after a few minutes. Has anyone experienced this? Am I creating the teams incorrectly? I added a screenshot of the Teams pane for reference.

 

Thank you!

2 Replies

A team needs an owner, if you don't specify one via the -Owner switch when running New-Team, the person running the cmdlet will be added as owner.

@Vasil Michev Thank you for the response, but I require that 2 owners be designated for every team I create. Example of the script is below

 

# Enter team info here:
$DisplayName = 'TST - Test 7'
$Description = 'Test teams capabilities - 7.'
$MailNickName = 'tm-tst-test_7'
$Owner1 = 'test.user@company.com'
$Owner2 = 'test.user5@company.com'
$Visibility = 'Private'

# Enter team members here:
$Members = 'test.user1@company.com','test.user2@company.com','test.user3@company.com','test.user4@company.com','test.user13@company.com' -split ','

# Team is created here:
$newTeam = New-Team -DisplayName $DisplayName -Description $Description -Visibility $Visibility -MailNickName $MailNickName -Owner $Owner1
  Add-TeamUser -GroupId $newTeam.groupID -User $Owner2 -Role Owner

# Members are added here:
 foreach($member in $Members){
 
        Add-TeamUser -GroupId $newTeam.GroupId -User $member -Role Member

        }


# Confirm team is created here:

  $TeamCreated = $(try {Get-Team -GroupId $newTeam.GroupId} catch {$Null})
If ($TeamCreated -ne $Null) {
        
        Write-Host $DisplayName 'team has been created.' -ForegroundColor Cyan

            Get-Team -DisplayName $newTeam.DisplayName | Select DisplayName, Description, mailNickname
            Get-TeamUser -GroupId $newTeam.GroupId | ft
           } 


else {

    Write-Host 'Womp, Womp... Error. $DisplayName was not created.' -ForegroundColor Red
}