Welcome to MSDN Blogs Sign in | Join | Help

SharePoint Thinks, Links and Clinks

SharePoint TLC as in Thinks (Thoughts and Findings), Links (to other blogs, msdn, technet, etc) and Clinks (toasts about coolness?)

News

  • Locations of visitors to this page

    These postings are provided as is with no warranties, and confers no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.

    web tracker
    View Tadd Dawson's profile on LinkedIn
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!

Posted: Friday, April 11, 2008 2:52 PM by tadd
Filed under: , , , ,
Anonymous comments are disabled
Page view tracker