SharePoint Online SPOMod: Set-SPOList
This article describes a function of a custom SharePoint Online module available for download and installation on GitHub where it welcomes all your suggestions and contributions.
Set-SPOList
The cmdlet sets the properties of a list.
Parameters
ListName | Mandatory | string | The name of the list | |||||||||
NoCrawl | Optional | Boolean | Specifies whether list items should appear in search results | |||||||||
Title | Optional |
String | Specifies new list title | |||||||||
Tag | Optional | String | ||||||||||
ContentTypesEnabled | Optional | bool | Sets Content Type Management | |||||||||
Description | Optional | String | ||||||||||
DraftVersionVisibility | Optional | Int | Set(0,1,2)
|
|||||||||
EnableAttachments | Optional | bool | ||||||||||
EnableMinorVersions | Optional | bool | ||||||||||
EnableFolderCreation | Optional | bool | ||||||||||
EnableVersioning | Optional | bool | ||||||||||
EnableModeration | Optional | bool | ||||||||||
ForceCheckout | Optional | bool | ||||||||||
Hidden | Optional | bool | ||||||||||
IRMEnabled | Optional | bool | ||||||||||
IsApplicationList | Optional | bool | ||||||||||
OnQuickLaunch | Optional | bool |
Examples
----- EXAMPLE 1 ------
Change title of a single list
Set-SPOList -ListName Quick1 -Title "Quick1 New Title"
----- EXAMPLE 2 ------
Change settings for a single list
Set-SPOList -ListName Quick1 -NoCrawl $true -ContentTypesEnabled $true -Description "Powershell Description" -DraftVersionVisibility 0 -EnableAttachments $false -EnableFolderCreation $true -EnableVersioning $true
----- EXAMPLE 3 ------
Enable versioning for all lists
foreach( $title in (Get-SPOList).Title){Set-SPOList -ListName $title -EnableVersioning $true}
----- EXAMPLE 4 ------
Enable Content Type Management for all lists
foreach( $title in (Get-SPOList).Title){Set-SPOList -ListName $title -ContentTypesEnabled $true}
----- EXAMPLE 5 ------
Add a list to the Quick Launch (menu on the left)
Set-SPOList -ListName Quick1 -OnQuickLaunch $true
----- EXAMPLE 6 ------
Remove a library from Quick Launch
Set-SPOList -ListName Documents -OnQuickLaunch $false
----- EXAMPLE 7 ------
Show all hidden lists.
foreach( $title in (Get-SPOList).Title){Set-SPOList -ListName $title -Hidden $false}
----- EXAMPLE 8 ------
Ensure the list items appear in search results.
Set-SPOList -ListName Quick2 -NoCrawl $false