Command
Copy-TermGroup
Description
The command to copy term groups from a SharePoint site to another.
Index
Examples
Get Term Groups to Copy 1
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $srcStore = Get-TermStore -Name "Managed Metadata Service" -Site $srcSite $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $dstStore = Get-TermStore -Name "Managed Metadata Service" -Site $dstSite $toCopy = Get-TermGroup -TermStore $srcStore Copy-TermGroup -TermGroup $toCopy -DestinationTermStore $dstStore
Get Term Groups to Copy 2
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $toCopy = Get-TermGroup -Site $srcSite -TermStoreName *Metadata* Copy-TermGroup -TermGroup $toCopy -DestinationSite $dstSite -TermStoreName *Metadata*
Copy All Term Groups
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-TermGroup -All -SourceSite $srcSite -DestinationSite $dstSite
Copy Some Term Groups
$dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" $srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" Copy-TermGroup -Name MyName*,MySpecificName -SourceSite $srcSite -DestinationSite $dstSite
Note: The * symbol is used to call multiple objects with a similar name.
Copy All Term Groups Pre-Check
$srcSite = Connect-Site -Url "http://myfarm1/sites/mysourcesite" $dstSite = Connect-Site -Url "http://myfarm1/sites/mydestinationsite" Copy-TermGroup -All -SourceSite $srcSite -DestinationSite $dstSite -WhatIf
Syntax
Copy-TermGroup-TermGroup <TermGroup[]>-DestinationSite <Site>[-DestinationTermStoreName <String>][-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Copy-TermGroup-TermGroup <TermGroup[]>-DestinationTermStore <TermStore>[-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Copy-TermGroup-Name <String[]>-SourceSite <Site>-DestinationSite <Site>[-SourceTermStoreName <String>][-DestinationTermStoreName <String>][-WhatIf <SwitchParameter>][-CopySettings <CopySettings>][-MappingSettings <MappingSettings>][-TaskName <String>]
Copy-TermGroup-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 |
-DestinationTermStore <TermStore>
Specifies the destination term store.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | DestinationTermStore |
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 |
-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 |
-TermGroup <TermGroup[]>
Specifies the source term groups to copy.
Required? | True |
Default value | None |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Default, DestinationTermStore |
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 |