spo term set add¶
Adds taxonomy term set
Usage¶
m365 spo term set add [options]
Options¶
-n, --name <name>
- Name of the term set to add
--termGroupId [termGroupId]
- ID of the term group in which to create the term set. Specify
termGroupId
ortermGroupName
but not both --termGroupName [termGroupName]
- Name of the term group in which to create the term set. Specify
termGroupId
ortermGroupName
but not both -i, --id [id]
- ID of the term set to add
-d, --description [description]
- Description of the term set to add
--customProperties [customProperties]
- JSON string with key-value pairs representing custom properties to set on the term set
-h, --help [help]
- Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isfull
. --query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv,md
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Remarks¶
Escaping JSON in PowerShell
When using the --customProperties
option it's possible to enter a JSON string. In PowerShell 5 to 7.2 specific escaping rules apply due to an issue. Remember that you can also use file tokens instead.
Important
To use this command you have to have permissions to access the tenant admin site.
Examples¶
Add taxonomy term set to the term group specified by ID
m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb
Add taxonomy term set to the term group specified by name. Create the term set with the specified ID
m365 spo term set add --name PnP-Organizations --termGroupName PnPTermSets --id aa70ede6-83d1-466d-8d95-30d29e9bbd7c
Add taxonomy term set and set its description
m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --description 'Contains a list of organizations'
Add taxonomy term set and set its custom properties
m365 spo term set add --name PnP-Organizations --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb --customProperties '{"Property":"Value"}'