Skip to content

spo sitescript add

Adds site script for use with site designs


spo sitescript add [options]


Option Description
--help output usage information
-t, --title <title> Site script title
-c, --content <content> JSON string containing the site script
-d, --description [description] Site script description
--query [query] JMESPath query string. See for more information and examples
-o, --output [output] Output type. json,text. Default text
--pretty Prettifies json output
--verbose Runs command with verbose logging
--debug Runs command with debug logging


Each time you execute the spo sitescript add command, it will create a new site script with a unique ID. Before creating a site script, be sure that another script with the same name doesn't already exist.


Create new site script for use with site designs. Script contents are stored in the $script variable

spo sitescript add --title "Contoso" --description "Contoso theme script" --content $script

More information