Table of Contents

Export-PnPTermGroupToXml

SYNOPSIS

Exports a taxonomy TermGroup to either the output or to an XML file.

SYNTAX

Export-PnPTermGroupToXml [-Identity <TermGroupPipeBind>] [-Out <String>] [-FullTemplate] [-Encoding <Encoding>]
 [-Force] [-Connection <PnPConnection>]   

DESCRIPTION

Allows to export a taxonomy TermGroup to either the output or to an XML file.

EXAMPLES

EXAMPLE 1

Export-PnPTermGroupToXml

Exports all term groups in the default site collection term store to the standard output

EXAMPLE 2

Export-PnPTermGroupToXml -Out output.xml

Exports all term groups in the default site collection term store to the file 'output.xml' in the current folder

EXAMPLE 3

Export-PnPTermGroupToXml -Out c:\output.xml -Identity "Test Group"

Exports the term group with the specified name to the file 'output.xml' located in the root folder of the C: drive.

EXAMPLE 4

$termgroup = Get-PnPTermGroup -Identity Test
$termgroup | Export-PnPTermGroupToXml -Out c:\output.xml

Retrieves a termgroup and subsequently exports that term group to a the file named 'output.xml'

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encoding

Defaults to Unicode

Type: Encoding
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Overwrites the output file if it exists.

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FullTemplate

If specified, a full provisioning template structure will be returned

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity

The ID or name of the termgroup

Type: TermGroupPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Out

File to export the data to.

Type: String
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices