kwizcom banner advertisement

SharePoint Online: Update List Title, Description, Quick Launch Navigation Properties using PowerShell

Requirement: Set Title, Description and Quick Launch Navigation settings in a SharePoint Online List.

How to Update List Title, Description and Quick Launch Navigation Settings in SharePoint Online?
To set list title, description and quick launch navigation options in SharePoint Online, follow these steps:
  • Navigate to your target list or library. Click on Settings Icon and then "Library Settings" (In Classic SharePoint, Under "List" tab, Click on "List Settings" button in the ribbon)
    update sharepoint online list using powershell
  • In the List or Library settings page, Click on "List name, description and navigation" link under General Settings.
    Set sharepoint online list Title using powershell
  • General Settings page, You can update the Title of the list, Description for the list and the option to show or hide list in Quick launch navigation. Click on "Save" to commit your changes.
    set sharepoint online list title, description, quick lanuch settings powershell

PowerShell to Set List Title, Description and Quick Launch Navigation Settings:
Here is the PowerShell script to update list settings.
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
   
#Config Parameters
$SiteURL= "https://crescent.sharepoint.com/"
$ListName="Project Docs"
 
#Setup Credentials to connect
$Cred = Get-Credential
$Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)
 
Try {
    #Setup the context
    $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
    $Ctx.Credentials = $Cred
   
    #Get the web and List
    $Web=$Ctx.Web
    $List=$web.Lists.GetByTitle($ListName)
  
    #Set List Title, Description and Quick launch Navigation properties
    $List.Title="Project Documentation"
    $List.Description="Document Repository to Store Upcoming Project Artifacts"
    $List.OnQuickLaunch=$True
    $List.Update()
    
    $Ctx.ExecuteQuery()

    Write-host -f Green "List Properties Updated!"
}
Catch {
    write-host -f Red "Error Setting List Properties!" $_.Exception.Message
}
SharePoint Online: Update List Title, Description, Quick Launch Navigation Properties using PowerShell SharePoint Online: Update List Title, Description, Quick Launch Navigation Properties using PowerShell Reviewed by Salaudeen Rajack on April 26, 2017 Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.