Hi @Marian Hercek ,
Here's an example on how to create a new team from a GroupId:
Install-Module MicrosoftTeams -Force
Connect-MicrosoftTeams
$SiteObj = Get-SPOSite -Identity $SiteURL.SiteURL
New-Team -GroupId $SiteObj.GroupId.Guid
Regarding the -Template parameter, read the following:
IMPORTANT: Using this cmdlet to create a new team using a template is still in preview. You can install and use the preview module from the PowerShell test gallery. For instructions on installing and using the Teams PowerShell preview module, see Install the pre-release version of the Teams PowerShell module.
Reference:
https://learn.microsoft.com/en-us/powershell/module/teams/New-Team?view=teams-ps
Here's an example on how to use the -Visibility parameter:
New-Team -DisplayName "Dev Team" -Description "Team for Development" -Visibility Public
or
$Team = New-Team -DisplayName "Dev Team"
Set-Team -GroupId $Team.GroupId -Visibility Private
----------
(If the reply was helpful please don't forget to upvote or accept as answer, thank you)
Best regards,
Leon