Get-SPOSiteScriptFromList

Creates site script syntax from an existing SharePoint list.

Syntax

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.

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

Required Parameters

-ListUrl

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

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online