Share via


Get-SPOSiteScriptFromList

Creates site script syntax from an existing SharePoint list.

Syntax

Default (Default)

Get-SPOSiteScriptFromList
    [-ListUrl] <String>
    [<CommonParameters>]

Description

Uses an existing SharePoint list to output a JSON blob that can be used to create a site script for use in a site design.

Examples

Example 1

This example creates the site script output from an existing list - and writes it to a variable. This variable is then referenced to create a site script.

$extracted = Get-SPOSiteScriptFromList -ListUrl "https://contoso.sharepoint.com/sites/strategy/customer-contacts"
Add-SPOSiteScript `
    -Title "Contoso Customer Tracker"
    -Description "This creates a customer contact list"
    -Content $extracted

Parameters

-ListUrl

Applicable: SharePoint Online

The url of the list to be referenced for the JSON output.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

Outputs

System.Object