Command
Copy-Team
Description
The command to copy teams from one 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
Copy a team with only a subset of channels
$source = Connect-Tenant -Domain sourcetenant $destination = Connect-Tenant -Domain destinationtenant $team = Get-Team -Name "MyTeam" -Tenant $source $channels = Get-TeamChannel -Name Channel* -Team $team Copy-Team -Team $team -Channel $channels -DestinationTenant $destination
Note: The * symbol is used to call multiple objects with a similar name.
Copy a team and modify its destination privacy
$source = Connect-Tenant -Domain sourcetenant$destination = Connect-Tenant -Domain destinationtenant$team = Get-Team -Name "MyPublicTeam" -Tenant $sourceCopy-Team -Team $team -DesiredDestinationPrivacy Private -DestinationTenant $destination
Syntax
Copy-Team-Team <Team[]>-DestinationTenant <Tenant>[-TeamTitle <String>][-Channel <TeamChannel[]>][-DesiredDestinationPrivacy <TeamDestinationPrivacy {SameAsSource | Standard | Private}>][-CopyOptions <TeamCopyOptions>][-NormalMode <SwitchParameter>][-MappingSettings <MappingSettings>][-TaskName <String>]
Parameters
-Channel <TeamChannel[]>
Specifies the channels to copy. 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 |
-CopyOptions <TeamCopyOptions>
Specifies the team copy options.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-DesiredDestinationPrivacy <TeamDestinationPrivacy>
Specifies the team's privacy settings for the destination. This parameter cannot be used when copying more than one team.
Required? | False |
Default value | SameAsSource |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-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. Note: Insane mode is always used by default in PowerShell.
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 |