Title, description and navigation for SharePoint list using PowerShell


In this article we will be seeing about the Title, description and navigationfor SharePoint list using PowerShell and c#.

Go to Document Library => Library Settings => General Settings =>Title, description and navigation.

TShare1.gif

Name and Description:

TShare2.gif

Navigation:

TShare3.gif

Using C#


using (SPSite site = newSPSite("http://serverName:1111/"))
            {
using (SPWeb web = site.RootWeb)
                {
SPListlibGeneralSettings= web.Lists["Doc Library"];
libGeneralSettings.Title = "Doc Library Updated";
libGeneralSettings.Description = "My updated Doc Library";
libGeneralSettings.OnQuickLaunch = false;
libGeneralSettings.Update();

                }
            }

Using PowerShell script:

$site=Get-SPSite "http://serverName:1111/"
$web=$site.RootWeb
$list=$web.Lists["Doc Library"]
$list.Title="Doc Library Updated"
$list.Description="My updated Doc Library"
$list.OnQuickLaunch = $false
$list.Update()