Howto: SharePoint Items Stats

Get-SPSite | % {$_.AllWebs} | % {$_.Lists} | measure-object -property ItemCount -sum -minimum -maximum -average Count – number of Lists in the SharePoint farm Sum – number of Items in the SharePoint farm Maximum – number of Items the biggest List has Average – Items per List (average)

PowerSlim v0.5 available

The new Remote feature available. How it works: 1. Run PowerSlim server on the remote COMPUTER PowerShell -executionpolicy unrestricted -file .\slim.ps1 35 server 2. !define COMMAND_PATTERN (PowerShell -executionpolicy unrestricted -file .\slim.ps1) 3. |Query:Remote|Computer|Get-Service| |DisplayName|Status| 4. Click TEST button.

Display SharePoint Site collection Administrators

This script displays all Site collection Administrators along with their email addresses for all web applications. Get-SPSite | % {$_.RootWeb.SiteAdministrators} | select @{name=’Url’;expr={$_.ParentWeb.Url}}, LoginName, Email If you are on WSS v.3/MOSS 2007 use the next defenition for Get-SPSite [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) | Out-Null function Get-SPSite{ $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $farm.services | % {if($_.WebApplications.Count){$_.WebApplications}} | % {if($_.sites.Count){$_.sites}} }

Howto: Display all SharePoint items created today

Get-SPSite | % {$_.AllWebs} | % {$_.Lists} | % {$_.Items} | ? {$_[“Created”].Date -eq [System.DateTime]::ToDay} | % {“$($_.Web.Url)/$($_.Url)”} If you are on WSS v.3/MOSS 2007 use the next defenition for Get-SPSite [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) | Out-Null function Get-SPSite{ $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $farm.services | % {if($_.WebApplications.Count){$_.WebApplications}} | % {if($_.sites.Count){$_.sites}} }

Display SharePoint Site Owners for Every Site

Get-SPSite | % {$_.RootWeb.AssociatedOwnerGroup.Users} | select @{name=’Url’;expr={$_.ParentWeb.Url}}, LoginName, Email If you are on WSS v.3/MOSS 2007 use the next defenition for Get-SPSite [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) | Out-Null function Get-SPSite{ $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $farm.services | % {if($_.WebApplications.Count){$_.WebApplications}} | % {if($_.sites.Count){$_.sites}} }