Command
Copy-Team
Description
The command to copy teams from a Microsoft 365 tenant to another.
Index
Examples
Copy a team
$source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $team = Get-Team -Name "MyTeam" -Tenant $source Copy-Team -Team $team -DestinationTenant $destination
Copy a team with a new name
$source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $team = Get-Team -Name "MyTeam" -Tenant $source Copy-Team -Team $team -TeamTitle "NewTeamTitle" -DestinationTenant $destination
Copy multiple teams
$source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $teams = Get-Team -Name "Team1","Team2","Team3" -Tenant $source -AllowMultiple Copy-Team -Team $teams -DestinationTenant $destination
Copy all teams
$source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $teams = Get-Team -Name "*" -Tenant $source -AllowMultiple Copy-Team -Team $teams -DestinationTenant $destination
Syntax
Copy-Team
-Team <Team[]>
-DestinationTenant <Tenant>
[-TeamTitle <String>]
[-NormalMode <SwitchParameter>]
[-MappingSettings <MappingSettings>]
[-TaskName <String>]
Parameters
-DestinationTenant <Tenant>
Specifies the destination SharePoint Admin center site.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-MappingSettings <MappingSettings>
Specifies the mapping settings.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-NormalMode <SwitchParameter>
Specifies that the normal mode should be used.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-TaskName <String>
Specifies a name for the task.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Team <Team[]>
Specifies the team to copy.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-TeamTitle <String>
Specifies the new team title. This parameter cannot be used when copying more than one team.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
Comments
4 comments
Is it possible to do an incremental update of the Copy-Team action?
Hi Philip,
It is unfortunately not possible to run increment copies of your teams. The PowerShell command is subject to the same limitations as the app. You can find the information in this article.
Where can I find more info on the MappingsSettings? What configuration can be made? Is this used for mapping users from tenant A to tenant B?
Hi Kristof,
You can use different kind of mappings and user mappings is part of it.
Depending on what type of mapping you wish to use, you should find the information you need in the appropriate section in this page.
For instance, if you scroll down you will find the sub-section for User and group mappings that contains articles with examples you can use to adapt your script.
Please sign in to leave a comment.