Powershell Help

Export-Taxml

NAME
    Export-Taxml
    
SYNOPSIS
    Exports taxonomy objects from a SharePoint server to a TAXML file.
    
    
SYNTAX
    Export-Taxml -Path <String> -SiteUrl <String> [-GroupIdFilter <Guid[]>] 
    [-TermStoreId <Guid>] [-Credential <PSCredential>] [-CloudCredential 
    [<SwitchParameter>]] [<CommonParameters>]
    
    
DESCRIPTION
    Export-Taxml communicates with Microsoft SharePoint Server 2013.  It reads 
    taxonomy items from the Managed Metadata Service and writes them to a 
    TAXML output file.  TAXML is an XML file format defined by the 
    "TaxmlFile.xsd" schema included with this toolkit.
    

PARAMETERS
    -Path <String>
        The filename where the TAXML output will be written.  If the ".taxml" 
        file extension is omitted, it will be appended automatically.
        
    -SiteUrl <String>
        The URL of a SharePoint site collection (SPSite) used to communicate 
        with the SharePoint Managed Metadata Service.
        
    -GroupIdFilter <Guid[]>
        An array of Taxonomy group identifiers.  If this is specified, the 
        Export-Taxml command will only export objects belonging to these 
        groups; otherwise, all objects will be exported.  In the SharePoint 
        "Term Store Management Tool", this identifier is shown under the 
        "Unique Identifier" heading when clicking on a group.
        
    -TermStoreId <Guid>
        Specifies the term store to be exported.  This parameter is required 
        if the server has more than one term store.  (In the Term Store 
        Management Tool for SharePoint 2013, this identifier can be found 
        under the "Unique Identifier" heading when clicking on the root of the 
        tree.)
        
    -Credential <PSCredential>
        Specifies a user account that has permission to perform the action.  
        By default the current Windows login will be used.  To specify a 
        different user name and password, provide a PSCredential object which 
        can be constructed using the Get-Credential cmdlet.
        
        For an on-prem server, the user name should use the "domain\alias" 
        format.  For a cloud server, use the "alias@example.com" format and 
        include the -CloudCredential switch.
        
    -CloudCredential [<SwitchParameter>]
        This switch must be included when accessing a site hosted by the 
        SharePoint Online cloud service.  It indicates that authentication 
        should be performed using the special Microsoft Online Service 
        library, which is distributed as part of the SharePoint Client 
        Components SDK.
        
        Note: A copy of the library is bundled with this toolkit; however, if 
        a version of the library was installed with your operating system, it 
        will be used instead and may need to be upgraded.
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, 
    see 
        about_CommonParameters 
        http://go.microsoft.com/fwlink/?LinkID=113216 
    
    --------------------------  Example 1  --------------------------
    PS C:\> Export-Taxml -Path Output.taxml -SiteUrl 
    http://www.example.com/sites/main -Verbose
    
    Exports all taxonomy items from the specified SharePoint site, with 
    verbose progress reporting.

    --------------------------  Example 2  --------------------------
    PS C:\> Export-Taxml -Path Output.taxml -SiteUrl 
    http://www.example.com/sites/main
    -TermStoreId '2B20F80B-C981-4159-8976-879B81E4346E' -GroupIdFilter 
    @('C3152636-B385-4FF6-86D6-D7BD67FF59D0', 
    '887C80BA-4CB9-409C-9BCF-490ECFE3D4F6')
    
    Only export items belonging to the two groups indicated by the 
    "-GroupIdFilter" parameter, from the specified term store.

    --------------------------  Example 3  --------------------------
    PS C:\> Export-Taxml -Path Output.taxml -SiteUrl 
    https://example-admin.sharepoint.com/ -Credential (Get-Credential 
    -UserName 'name@example.com' -Message 'Enter password:') -CloudCredential
    
    Exports taxonomy items from a site hosted by the SharePoint Online cloud 
    service.  A dialog box is displayed to prompt for the user's password.  
    Note that the tenant admin URL ("example-admin") is used instead of a 
    regular site URL.

Import-Taxml

NAME
    Import-Taxml
    
SYNOPSIS
    Imports taxonomy objects from a TAXML file to a SharePoint server.
    
    
SYNTAX
    Import-Taxml -Path <String> -SiteUrl <String> [-TermStoreId <Guid>] 
    [-MaximumBatchSize <Int32>] [-Credential <PSCredential>] [-CloudCredential 
    [<SwitchParameter>]] [<CommonParameters>]
    
    
DESCRIPTION
    Import-Taxml communicates with Microsoft SharePoint Server 2013.  It reads 
    taxonomy items from a TAXML input file and writes them to the Managed 
    Metadata Service.  TAXML is an XML file format defined by the 
    "TaxmlFile.xsd" schema included with this toolkit.
    

PARAMETERS
    -Path <String>
        The filename that the TAXML input will be read from.  If the ".taxml" 
        file extension is omitted, it will be appended automatically.
        
    -SiteUrl <String>
        The URL of a SharePoint site collection (SPSite) used to communicate 
        with the SharePoint Managed Metadata Service.
        
    -TermStoreId <Guid>
        Specifies the target term store for the import operation.  This 
        parameter is required if the server has more than one term store.  (In 
        the Term Store Management Tool for SharePoint 2013, this identifier 
        can be found under the "Unique Identifier" heading when clicking on 
        the root of the tree.)
        
    -MaximumBatchSize <Int32>
        Specifies the maximum number of operations that can be combined as a 
        batch into a single Client Side Object Model (CSOM) server request.  
        Larger values typically improve performance, but also increase the 
        risk of failures that may occur if the network transaction takes too 
        long to complete or exceeds the maximum number of bytes permitted by 
        the server.
        
        The definition of an "operation" is complex, but roughly corresponds 
        to finding, creating, updating, or deleting a taxonomy group, term 
        set, or term.  The actual batch size may be much smaller than 
        MaximumBatchSize, since the dependency graph restricts which 
        operations can be combined in a single transaction.
        
    -Credential <PSCredential>
        Specifies a user account that has permission to perform the action.  
        By default the current Windows login will be used.  To specify a 
        different user name and password, provide a PSCredential object which 
        can be constructed using the Get-Credential cmdlet.
        
        For an on-prem server, the user name should use the "domain\alias" 
        format.  For a cloud server, use the "alias@example.com" format and 
        include the -CloudCredential switch.
        
    -CloudCredential [<SwitchParameter>]
        This switch must be included when accessing a site hosted by the 
        SharePoint Online cloud service.  It indicates that authentication 
        should be performed using the special Microsoft Online Service 
        library, which is distributed as part of the SharePoint Client 
        Components SDK.
        
        Note: A copy of the library is bundled with this toolkit; however, if 
        a version of the library was installed with your operating system, it 
        will be used instead and may need to be upgraded.
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see 
        about_CommonParameters 
        http://go.microsoft.com/fwlink/?LinkID=113216
    
    --------------------------  Example 1  --------------------------
    PS C:\> Import-Taxml -Path Input.taxml -SiteUrl 
    http://www.example.com/sites/main
    
    Import taxonomy items to a SharePoint site.

    --------------------------  Example 2  --------------------------
    PS C:\> Import-Taxml -Path Input.taxml -SiteUrl 
    http://www.example.com/sites/main -TermStoreId 
    '2B20F80B-C981-4159-8976-879B81E4346E'
    
    Import taxonomy items to a specific term store for the SharePoint site.

    --------------------------  Example 3  --------------------------
    PS C:\> Import-Taxml -Path Input.taxml -SiteUrl 
    https://example-admin.sharepoint.com/ -Credential (Get-Credential 
    -UserName 'name@example.com' -Message 'Enter password:') -CloudCredential
    
    Import taxonomy items to a site hosted by the SharePoint Online cloud 
    service.  A dialog box is displayed to prompt for the user's password.  
    Note that the tenant admin URL "example-admin" is used instead of a 
    regular site URL.

Convert-CsvToTaxml

NAME
    Convert-CsvToTaxml
    
SYNOPSIS
    Converts a Term Store Manager CSV file to TAXML format.
    
    
SYNTAX
    Convert-CsvToTaxml -CsvPath <String> -TaxmlPath <String> 
    [<CommonParameters>]
    
    
DESCRIPTION
    Convert-CsvToTaxml reads a comma-separated values (CSV) data file 
    conforming to the "ImportTermSet.csv" template that is used with 
    SharePoint's "Import Term Set" command.  To obtain this template from your 
    SharePoint site, go to the Term Store Manager page, select the term store 
    object, and then click the link for "View a sample import file".
    
    A typical usage scenario might be: 1. Use Excel to edit the template, then 
    save the updated CSV file.  2. Invoke Convert-CsvToTaxml to produce a 
    TAXML file "Output.taxml".  3. Use Windows Notepad to make any final 
    changes to Output.taxml.  4. Invoke Import-Taxml to upload Output.taxml to 
    the SharePoint server.
    

PARAMETERS
    -CsvPath <String>
        The filename of the CSV file to be read.
        
    -TaxmlPath <String>
        The filename where the TAXML output will be written.
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters 
    (http://go.microsoft.com/fwlink/?LinkID=113216). 
    
    --------------------------  Example 1  --------------------------
    PS C:\> Convert-CsvToTaxml -CsvPath .\ImportTermSet.csv -TaxmlPath 
    .\Output.taxml
    
    Reads from ImportTermSet.csv and creates an output file called 
    Output.taxml.

Last edited Jun 9, 2016 at 5:24 PM by pgonzal, version 5