Category Archives: Administration - Page 2

List All Web Parts in a SharePoint 2010 Site Collection Using Windows PowerShell

I won’t make this overly complex, but if your organization is rapidly growing with SharePoint and you, farm admin, or your site collection administrators, or even your site owners are all super excited about SharePoint’s capabilities and you are provisioning sites or pages to justify the ever growing demands of your business, then you probably are adding hundreds of web parts to your sites and pages.

In most cases, these web parts are simply what shipped with the product and what gets placed on the sites once you provision them such as ‘Shared Documents’ or ‘Announcements’. In other cases, they maybe web parts developed in house by your development team to meet a specific demand such as ‘a moving average chard web part’ or even purchased from a third party vendor like Quest Software or Bamboo Solutions.

In any case, as your SharePoint succeeds and grows, and again, as you drop more web parts to your pages, the need to control and understand were these web parts are becomes super important. You will want to know which web parts are open and which ones are closed, which ones are used and which ones are not, which ones are affecting load time on pages and which ones are causing errors.

The video below captures the steps involved in executing a Windows PowerShell script that will loop through pages on publishing and non-publishing sites, finds all web parts, and outputs the result to a grid view.

Video length: 2:27

Use the below script to list all web parts in a site collection. The script loops through all pages, publishing and non-publishing sites, finds all web parts, and displays them on a grid view.

Note: Make sure you change the URL at the bottom of the script to your site collection URL.

 function enumerateWebParts($Url) {
    $site = new-object Microsoft.SharePoint.SPSite $Url    foreach($web in $site.AllWebs) {
        if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($web)) {
            $pWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
            $pages = $pWeb.PagesList
            foreach ($item in $pages.Items) {
                $fileUrl = $webUrl + “/” + $item.File.Url
                $manager = $item.file.GetLimitedWebPartManager([System.Web.UI.WebControls.Webparts.PersonalizationScope]::Shared);
                $wps = $manager.webparts
                $wps | select-object @{Expression={$pWeb.Url};Label=”Web URL”},@{Expression={$fileUrl};Label=”Page URL”}, DisplayTitle, IsVisible, @{Expression={$_.GetType().ToString()};Label=”Type”}
            }
        }
        else {
            $pages = $null
            $pages = $web.Lists[“Site Pages”]            if ($pages) {                foreach ($item in $pages.Items) {
                    $fileUrl = $webUrl + “/” + $item.File.Url
                    $manager = $item.file.GetLimitedWebPartManager([System.Web.UI.WebControls.Webparts.PersonalizationScope]::Shared);
                    $wps = $manager.webparts
                    $wps | select-object @{Expression={$pWeb.Url};Label=”Web URL”},@{Expression={$fileUrl};Label=”Page URL”}, DisplayTitle, IsVisible, @{Expression={$_.GetType().ToString()};Label=”Type”}
                }
            }
            else {
            }
        }        Write-Host “… completed processing” $web
    }
}$row = enumerateWebParts(‘http://sharepoint2010/sites/spquester’)
$row | Out-GridView

If the Integrated Script Editor (ISE) is not installed, execute the following script then go back to the script above and execute it.

Import-Module ServerManagerAdd-WindowsFeature PowerShell-ISE

Exploring the Datasheet View Task Pane in SharePoint 2010 Lists

Video Length: 2:29

Video description: This video explores the task pane in the Datasheet view of a SharePoint 2010 list/library.

Read more »

Prohibiting Users from Creating a Personal My Site in SharePoint 2010

Video length: 2:31

Video description: This video walks through the process of prohibiting users from creating a SharePoint 2010 Personal My Site.

Read more »

How To Enable Inline Editing On SharePoint 2010 Lists

Video length: 1:28

Video description: This video walks through the process of enabling inline editing on SharePoint 2010 lists. Inline editing is simply a configuration of an ordinary list view. It allows users to edit properties for a list item, without requiring them to open the item.

Read more »

Configuring Incoming Email on a SharePoint 2010 Document Library

Video length: 6:49

Video description: This video walks through the process of enabling a document library to receive incoming email. The video shows how to activate the SMTP feature in Windows Server, how to configure Incoming email settings in SharePoint Central Administration and how to enable a document library to receive emails.

Read more »

Removing User Alerts from a Web Application in SharePoint 2010 Using Windows PowerShell

Video length: 2:05

Video description: This video walks through the process of removing a specific user alerts from a web application in SharePoint 2010 using Windows PowerShell

Read more »

Reporting on Site Alerts in SharePoint 2010 Using Windows PowerShell

Video Length: 1:21

Video Description: This video walks through reporting on site alerts in SharePoint 2010 using Windows PowerShell. The script provided can be used against sites or site collections, the results of the script will present the list name, alert title, and the subscribed user all followed by a liner for easy reading.

Read more »

Reporting on Activated Site Collection Features in SharePoint 2010 Using Windows PowerShell

Video length: 2:53

Video description: This video walks through the process of generating a report on all activated site collection features in SharePoint 2010 using Windows PowerShell. The video also shows how you can report against active features at the web application level as well as reporting on a specific feature to see if it has been activated or not at the site collection level.

Read more »

Creating Multiple Site Collections in SharePoint 2010 using Windows PowerShell

Video length: 4:03

Video description: This video walks through the process of creating multiple site collections with multiple content database names in SharePoint 2010 using Windows PowerShell.

Read more »

Create a large List using Windows PowerShell in SharePoint 2010

Video length: 2:05

Video description: This video walks through the process of creating a large SharePoint 2010 list using Windows PowerShell.

Documented video steps below:

Read more »