Home > Appendices > Export Terms from SharePoint
Export to PDFRefer to the following sections to export terms from SharePoint Online and SharePoint On-Premises.
To export a term group together with the term sets and terms from the term store in the SharePoint admin center to a CSV file using Windows PowerShell, complete the following steps:
Click this link to download the ExportSPTermScript.zip file.
Copy the ExportSPTermScript.zip file to a server with a network connection.
Extract the ExportSPTermScript.zip file to find the ExportSPTermtoCsv.ps1 file.
Locate Windows PowerShell on this server.
Right-click Windows PowerShell, and then select Run as administrator. The Administrator: Windows PowerShell window appears.
In the window, enter the following commands:
*Note: There is helpful information on how to export terms using Windows PowerShell. To view the help information, enter .\ExportSPTermtoCsv.ps1, and then press Enter on the keyboard.

Enter cd "full path", and then press Enter on the keyboard. Replace full path with the full path of the ExportSPTermtoCsv.ps1 file.
Enter the following commands:
.\ExportSPTermtoCsv.ps1 "https://tenant-admin.sharepoint.com" "BusinessClassification"

https://tenant-admin.sharepoint.com – Replace it with the Central Admin URL of SharePoint Online where you want to export terms.
BusinessClassification – Replace it with the name of the term group that you want to export.
Press Enter on the keyboard to execute the commands entered above.
*Note: During the execution process, your admin credentials to the term store where you want to export terms will be required. Enter your admin credentials to proceed.
After Windows PowerShell completes the execution, a CSV file that stores the exported terms within is automatically generated. The CSV file is named in the format of Terms_Date_Time.csv and stored in the Reports folder.
*Note: If terms fail to be exported, the reason will be recorded in the log file. The log file is named in the format of Terms_Date_Time.log and stored in the Reports folder.
When there are a large number of terms to export, an error will sometimes occur if you export terms to a CSV file. You can export terms of a large number to an XML file using PnP PowerShell.
If there is no PnP PowerShell, you need to install the PnP PowerShell module on your local machine where you are going to run the file. To install the PnP PowerShell module, run Windows PowerShell as administrator, and then enter the Install-Module -Name "PnP.PowerShell" command to proceed.
*Note: The PnP PowerShell module is a successor of the SharePointPnPPowerShellOnline module. Before installing the PnP PowerShell module, make sure you have uninstalled the SharePointPnPPowerShellOnline module if there is one. You can run Windows PowerShell as an administrator, and enter the Uninstall-Module -Name "SharePointPnPPowerShellOnline" -AllVersions -Force command to uninstall it.
Refer to the following steps to export terms to an XML file using PnP PowerShell:
Locate Windows PowerShell on your server.
Right-click Windows PowerShell, and then select Run as administrator. The Administrator: Windows PowerShell window appears.
In the window, enter the following command and then press Enter on your keyboard to connect to your SharePoint Online: Connect-PnpOnline -URl "https://tennantname-admin.sharepoint.com" - UseWebLogin. Replace https://tenant-admin.sharepoint.com with the Central Admin URL of SharePoint Online where you want to export terms.

During the execution process, your admin credentials to the term store where you want to export terms will be required. Enter your admin credentials to proceed.
Enter the following command and then press Enter on your keyboard to export terms: Export-PnPTermGroupToXml -Out C:\exportTermGroup.xml -Identity groupname. Replace C:\exportTermGroup.xml with the full path of the location where the export terms will be stored, and replace groupname with the name of the term group that you want to export.

Navigate to the defined location to find the XML file containing the exported terms.
*Note: XML files have higher format requirements than CSV files. Therefore, we do not recommend you modify terms in the XML file in case that the XML file fails to be imported to AvePoint Opus.
To export a term group together with the term sets and terms from SharePoint Managed Metadata Service to a CSV file using Windows PowerShell, complete the following steps:
Click this link to download the ExportSPTermScript.zip file.
Copy the ExportSPTermScript.zip file to a server with a network connection.
Extract the ExportSPTermScript.zip file to find the ExportSPOnPremisesTermtoCsv.ps1 file.
Copy the ExportSPOnPremisesTermtoCsv.ps1 file to any one of the Web front-end servers or the Central Administration server of SharePoint where you want to export terms.
On the SharePoint Web front-end server or Central Administration server where the copied ExportSPOnPremisesTermtoCsv.ps1 file resides, locate Windows PowerShell.
Right-click Windows PowerShell, and then select Run as administrator. The Administrator: Windows PowerShell pop-up window appears.
In the pop-up window, enter the following commands:
*Note: There is helpful information on how to use Windows PowerShell to export terms. To view the help information, enter .\ExportSPOnPremisesTermtoCsv.ps1, and then press Enter on the keyboard.

Enter cd "full path", and then press Enter on the keyboard. Replace full path with the full path of the ExportSPOnPremisesTermtoCsv.ps1 file.
Enter the following commands:
.\ExportSPOnPremisesTermtoCsv.ps1 "http://hostname:port" "Managed Metadata Service" "BusinessClassification" "Department"
*Note: If terms failed to be exported, the reason why the terms failed to be exported will be recorded in the log.txt file in the same directory as the ExportSPOnPremisesTermtoCsv.ps1 file.