| external help file | sharepointonline.xml |
|---|---|
| Module Name | Microsoft.Online.SharePoint.PowerShell |
| online version | https://learn.microsoft.com/powershell/module/sharepoint-online/get-spositescriptfromlist |
| applicable | SharePoint Online |
| title | Get-SPOSiteScriptFromList |
| schema | 2.0.0 |
| author | trent-green |
| ms.author | trgreen |
| ms.reviewer |
Creates site script syntax from an existing SharePoint list.
Get-SPOSiteScriptFromList -ListUrl <string> [<CommonParameters>]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.
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 $extractedThe url of the list to be referenced for the JSON output.
Type: String
Parameter Sets: (All)
Aliases:
Applicable: SharePoint Online
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.