Question

I have a sharepoint portal which have hundreds of subsites. The users can create new site and by default when a site is created it has Libraries, lists and discussions link out of the box. I got a request from users to remove all the Site Pages link (under libraries section).

Can this be accomplished using PowerShell script?

Was it helpful?

Solution

$site = Get-SPSite -Identity http://myportal
foreach ($web in $site.AllWebs) { 
   $list = $web.Lists["Site Pages"]
   $list.OnQuickLaunch = $FALSE 
   $list.Update()
   $web.Dispose()
   }
$site.Dispose()

OTHER TIPS

The short and long answer is : Use a site template of course. Create a site which you customise the way you want by removing the Site Pages link and complete all your other customisations for that site.

Backup the site as a template.

Configure your root web to allow that site template for new sites.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top