November 24, 2011

Creating Custome Dashboards & Count cards in SharePoint 2007

Hi,

in my new SharePoint site creation & customization, we got a one major requirement to create a custom Dashboard & a Count card. so after my googling i got one very useful articale here & here. so by the use of article knowledge i decided to create my own. and the resulting Out put:

in the above 3 places, the DVWP picks the data from the different Libraries & Lists. but here the challenging part that i have faced is to pick the count value of items as uniq (lie part 2, N.of Contributor should be uniq count of users who submitted their ideas from the electronic form to the library)
i struggled to google & found the solution as below:

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[not (@Username=preceding-sibling::Row/@Username)]" />

Regards,
JK

PowerShell Script To Display All SharePoint Site Collection Administrators In Web Application

Hi,

In my SharePoint Environment, we got a requirement to populate site collection admins list from the couple of  web applications. each web appilication contains 30+ sitecollections. so to pick the list in a manual way is a bit difficult & i am lazy too. so i got this below script in the artcle, and i modified according to my requirement to generate a report. script as below:

[System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”)
$siteUrl = Read-Host "Enter Site URL"
$rootSite = New-Object Microsoft.SharePoint.SPSite($siteUrl)
$spWebApp = $rootSite.WebApplication
 foreach($site in $spWebApp.Sites)
{
    Write-Host "-----------------------------------------------------------"
    Write-Host "$site"
    foreach($siteAdmin in $site.RootWeb.SiteAdministrators)
    {
        Write-Host "$($siteAdmin.Name)"
    }
    $site.Dispose()
    Write-Host "-----------------------------------------------------------"
}
$rootSite.Dispose()


Regards,
Girish