Clearpeople can provide PowerShell scripts which can be used to export your Taxonomy from the Term Store. The process described in this article should be followed if you wish to export your Taxonomy into an Excel or CSV format. If you need to do this, please start by contacting your CSA or raising a ticket on Zendesk and letting them know you need to export your taxonomy; they can then provide the scripts.
If you have turned the Term Store Backups on in Atlas, you can find Term Store backups in an XML format in the Atlas Configuration workspace, in the Atlas Configuration Files library e.g.
https://YourTenant/sites/atlasconfiguration/AtlasConfigurationFiles/Term%20store%20backups
So before you begin running this script, you should determine which format you need. If you can't use an XML file for this, or if your backups are turned off, you can follow this article to get a CSV format.
Pre-Requisites
- Powershell 7.2 or later must be installed (should be included with Windows)
- PnP Powershell version 1.12 must be installed. Later versions of PnP do not work for this script.
If you have issues installing PnP Powershell 1.12, we recommend to run these commands, in a Powershell instance launched as Admin:
- Uninstall-Module PnP.Powershell
- If this does not work then you do not have PnP installed right now. Ignore and continue.
- Set Tls12 protocol [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Install NuGet
- Install-PackageProvider -Name nuget -MinimumVersion 2.8.5.201 -force
- Install PnP.PowerShell with version 1.12.0
- Install-Module -Name "PnP.PowerShell" -RequiredVersion 1.12.0 -Force -AllowClobber
If you have issues running the scripts at all, ensure that your execution policy is set correctly. You can check the status of this with the command Get-ExecutionPolicy (see here to learn how to change the policy on your machine if needed).
PowerShell Script Setup
We provide a set of PowerShell Scripts to carry out the Taxonomy export. You will need request these scripts from our team and download them into a folder in your computer:
- Common Utilities.ps1
- Taxonomy-Export-Termsets.ps1
These files must be stored in the same folder on your machine, as seen below. The outputs from this script will be generated in the same location, in a folder called "Output".
Run the script
Firstly, change the current directory to where the scripts are located. This will be based on where you downloaded the scripts to:
eg. cd "C:\Atlas\Utilities\Taxonomy-Export"
Then, execute the Taxonomy-Export-Termsets.ps1 script and pass the following parameters:
- -siteCollectionURL - Supply your tenant URL
- -termGroupName - Supply either "Atlas" or "Atlas Navigation"
- -termsetName - Use this if you want to export a specific term set, for instance just "Activity". If you do not supply this parameter it will export all term sets in the group.
- -includeTermId - This can be True or False, depending if you want the TermID in the output file.
Once the script has been executed, the exported files will be in the "Output" folder. If you do not specify a Term Set there will be a subfolder created for the site URL and inside will be a .txt for each term set:
Otherwise you will just get one file for the Term Set you chose.
Converting the .txt into Excel / CSV
You will likely want the terms structured into a more easily readable format, so we would recommend creating an Excel file that has different sheets for each Term Set.
To open the .txt files as a .csv you will need to open them from within a blank Excel document. So open Excel, click Open, navigate to the output files directory, and ensure you are looking at 'All Files’ instead of 'Excel files' in the bottom right of the file picker:
Now you will be able to see and open the .txt files.
Once you try to open the .txt, in the new window that comes up you will need to choose ‘Delimited’ if not already selected.
And on the next page, click "Other" as well as leaving the "Tab" option selected and insert a pipe character (|) - this may be auto selected by Excel but not always:
Then click finish, and you will have an Excel version of each Term Set with the correct columns. From this point you can combine these into a single spreadsheet and manipulate the data as you see fit.
We would advise that you create a notes column and add notes such as ‘delete’,’ merge with X-term’, ‘rename to Y-Term’, etc., so you can keep track of actions for each term. Any new terms you create should be identified as new terms not in the original Term Store so these can be created easily later on.
Still need help?
If you have any questions on the above do please ask your CSA or reach the team on support@clearpeople.zendesk.com
Comments
0 comments
Article is closed for comments.