Command
Copy-TermSet
Description
The command to copy term sets from a SharePoint site to another.
Index
Examples
Get Term Sets to Copy 1
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $srcGroup = Get-TermGroup -Name "MySrcTermGroup" -Site $srcSite $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $dstGroup = Get-TermGroup -Name "MyDstTermGroup" -Site $dstSite $toCopy = Get-TermSet -TermGroup $srcGroup Copy-TermSet -TermSet $toCopy -DestinationTermGroup $dstGroup
Get Term Sets to Copy 2
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $toCopy = Get-TermSet -Site $srcSite -TermGroupName "MySrcTermGroup" Copy-TermSet -TermSet $toCopy -DestinationSite $dstSite -TermGroupName "MyDstTermGroup"
Copy All Term Sets
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-TermSet -All -SourceSite $srcSite -SourceTermGroupName "MySrcTermGroup" -DestinationSite $dstSite -DestinationTermGroupName "MyDstTermGroup"
Copy Some Term Sets
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Connect-Site -Url "http://myfarm1/sites/mysourcesite" | Copy-TermSet -Name MyName*,MySpecificName -SourceTermGroupName "MySrcTermGroup" -DestinationSite $dstSite -DestinationTermGroupName "MyDstTermGroup"
Note: The * symbol is used to call multiple objects with a similar name.
Copy All Term Sets Pre-Check
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-TermSet -All -SourceSite $srcSite -SourceTermGroupName "MySrcTermGroup" -DestinationSite $dstSite -DestinationTermGroupName "MyDstTermGroup" -WhatIf
Syntax
Copy-TermSet-TermSet <TermSet[]>-DestinationTermGroupName <String>-DestinationSite <Site>[-DestinationTermStoreName <String>][-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Copy-TermSet-TermSet <TermSet[]>-DestinationTermGroup <TermGroup>[-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Copy-TermSet-SourceTermGroupName <String>-DestinationTermGroupName <String>-Name <String[]>-SourceSite <Site>-DestinationSite <Site>[-SourceTermStoreName <String>][-DestinationTermStoreName <String>][-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Copy-TermSet-SourceTermGroupName <String>-DestinationTermGroupName <String>-All <SwitchParameter>-SourceSite <Site>-DestinationSite <Site>[-SourceTermStoreName <String>][-DestinationTermStoreName <String>][-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Parameters
-All <SwitchParameter>
Specifies that they all be copied.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | All |
Aliases | None |
-CopySettings <CopySettings>
Specifies the copy settings.
Required? | False |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-DestinationSite <Site>
Specifies the destination site.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Default, Name, All |
Aliases | None |
-DestinationTermGroup <TermGroup>
Specifies the destination term group.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | DestinationTermGroup |
Aliases | None |
-DestinationTermGroupName <String>
Specifies the destination term group name.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Default, Name, All |
Aliases | None |
-DestinationTermStoreName <String>
Specifies the destination term store name.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Default, 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 |
-Name <String[]>
Specifies the name (Wildcards supported).
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | True |
Parameter set name | Name |
Aliases | None |
-SourceSite <Site>
Specifies the source site.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Name, All |
Aliases | None |
-SourceTermGroupName <String>
Specifies the source term group name.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Name, All |
Aliases | None |
-SourceTermStoreName <String>
Specifies the source term store name.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | 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 |
-TermSet <TermSet[]>
Specifies the source term sets to copy.
Required? | True |
Default value | None |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Default, DestinationTermGroup |
Aliases | None |
-WhatIf <SwitchParameter>
Specifies that a pre-check will be executed instead of a migration. For more information, see Run a Pre-Check in PowerShell.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |