Five Fabulous Fantastic Function Filters Powerful PowerShell for SharePoint
Darrin Bishop has useful and informational post on 5 different PowerShell Functions/Filters for SharePoint. quick, click here -
Five Simple But Powerful PowerShell Functions/Filters for SharePoint
The image from his site is worth the trip alone and then the filters map to the relationship nicely.
These functions can reveal a multitude of information about your implementation and are extremely helpful in teaching about PowerShell, SharePoint and Objects!
#Return an object that is the local SharePoint Farm
function Get-LocalFarm
{
return [Microsoft.SharePoint.Administration.SPFarm]::Local
}
filter Get-WebService
{
$webServices = new-object Microsoft.SharePoint.Administration.SPWebServiceCollection($_)
$webServices
}
filter Get-WebApplication
{
$_.WebApplications
}
filter Get-SiteCollection
{
$_.Sites
}
filter Get-Web
{
$_.AllWebs
}
I highly recommend that you take a visit to Darrin’s blog Five Simple But Powerful PowerShell Functions/Filters for SharePoint for a very easy to follow description of how useful this can be.
Clink! as in a good one to Darrin Bishop and PowerShell. Hey, don’t forget SharePoint!
Comments
- Anonymous
April 13, 2008
PingBack from http://stevepietrek.com/2008/04/13/links-4132008/