|
Import-SPTerms
Import the Managed Metadata Terms. Import-SPTerms -TaxonomySession <SPTaxonomySessionPipeBind> -InputFile <XmlDocumentPipeBind> [-AssignmentCollection [<SPAssignmentCollection>]] Import-SPTerms -ParentTermStore <SPTaxonomyTermStorePipeBind> -InputFile <XmlDocumentPipeBind> [-AssignmentCollection [<SPAssignmentCollection>]] Import-SPTerms -ParentGroup <SPTaxonomyGroupPipeBind> -InputFile <XmlDocumentPipeBind> [-AssignmentCollection [<SPAssignmentCollection>]] Import-SPTerms -ParentTermSet <SPTaxonomyTermSetPipeBind> -InputFile <XmlDocumentPipeBind> [-AssignmentCollection [<SPAssignmentCollection>]] Import-SPTerms -ParentTerm <SPTaxonomyTermPipeBind> -InputFile <XmlDocumentPipeBind> [-AssignmentCollection [<SPAssignmentCollection>]] Parameters1 Parameter | Required | Type | Description |
---|
TaxonomySession | True | SPTaxonomySessionPipeBind | The TaxonomySession object to import Term Stores into. | InputFile | True | XmlDocumentPipeBind | The path to the file containing the terms to import or an XmlDocument object or XML string. | AssignmentCollection | False | SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used. When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur. |
2 Parameter | Required | Type | Description |
---|
ParentTermStore | True | SPTaxonomyTermStorePipeBind | The TermStore object to import Groups into. | InputFile | True | XmlDocumentPipeBind | The path to the file containing the terms to import or an XmlDocument object or XML string. | AssignmentCollection | False | SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used. When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur. |
3 Parameter | Required | Type | Description |
---|
ParentGroup | True | SPTaxonomyGroupPipeBind | The Group object to import Term Sets into. | InputFile | True | XmlDocumentPipeBind | The path to the file containing the terms to import or an XmlDocument object or XML string. | AssignmentCollection | False | SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used. When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur. |
4 Parameter | Required | Type | Description |
---|
ParentTermSet | True | SPTaxonomyTermSetPipeBind | The TermSet object to import Terms into. | InputFile | True | XmlDocumentPipeBind | The path to the file containing the terms to import or an XmlDocument object or XML string. | AssignmentCollection | False | SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used. When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur. |
5 Parameter | Required | Type | Description |
---|
ParentTerm | True | SPTaxonomyTermPipeBind | The Term object to import Terms into. | InputFile | True | XmlDocumentPipeBind | The path to the file containing the terms to import or an XmlDocument object or XML string. | AssignmentCollection | False | SPAssignmentCollection | Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used. When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur. |
Detailed DescriptionImport the Managed Metadata Terms. Copyright 2016 Falchion Consulting, LLC > For more information on this cmdlet and others: > http://blog.falchionconsulting.com/ > Use of this cmdlet is at your own risk. > Gary Lapointe assumes no liability. Examples------------------EXAMPLE 1----------------------- PS C:\> Import-SPTerms -TaxonomySession "http://site/" -InputFile "c:\terms.xml" ------------------EXAMPLE 2----------------------- PS C:\> Import-SPTerms -ParentTermStore (Get-SPTaxonomySession -Site "http://site/").TermStores[0] -InputFile "c:\terms.xml"
|