Getting an Inventory of All SharePoint Documents Using Windows PowerShell

Posted on 118 CommentsPosted in Scripts, SharePoint 2010

I got an email today asking if I had anything that would generate a report detailing all the documents throughout an entire SharePoint Farm. As this wasn’t the first time I’ve been asked this same question I decided that I’d just go ahead and post the script for generating such a report. The script is really quite straightforward – it simply iterates through all Web Applications, Site Collections, Webs, Lists, and finally, List Items. I […]

Deploying SharePoint 2010 Solution Packages Using PowerShell

Posted on 20 CommentsPosted in Scripts, SharePoint 2010

Update 4/19/2011: I’ve reworked this script completely. You can find the update here: With SharePoint 2010 we can now deploy our Solution Packages using PowerShell. What’s cool about this is that it’s a bit easier than it was with 2007 to check if a package is already deployed and conditionally retract, delete, and then re-add and re-deploy. By now most people already know how to do this as it’s fairly straightforward but I thought […]

Discovering Who Has Access to SharePoint 2010 Securable Objects

Posted on 38 CommentsPosted in Scripts, SharePoint 2010

I’ve talked on several occasions about how we can easily use the SharePoint 2010 object model (OM) to discover who has access to a securable object (SPWeb, SPList, or SPListItem) and the fact that we can use the same mechanisms within PowerShell to create useful security/audit reports. On some of those occasions I’ve shown a version of a PowerShell script which gives you a dump to the screen or a text file of every securable […]

Starting the SharePoint 2010 Foundation Search Service using PowerShell

Posted on 7 CommentsPosted in Scripts, SharePoint 2010

It’s been a while since my last real SharePoint 2010 scripting post but we’re getting close to RTM so I figured I need to buckle down and play some catch up and get some long overdue posts published. So, continuing my series of posts on scripting the various services and service applications within SharePoint 2010 I decided that I would share something that I know a lot of people have been struggling with recently – […]

Creating a SharePoint 2010 Enterprise Search Service Application using PowerShell

Posted on 30 CommentsPosted in Scripts, SharePoint 2010

The information in this post is specific to SharePoint 2010 Beta 2 and may need adjusting for the RTM version. In an effort to continue with my previous posts where I demonstrated how to build a basic farm and it’s site structure using XML configuration files and PowerShell for SharePoint 2010 I would like to now share how to create a search service application. An automated install of the service applications is, without a doubt, […]

Creating a SharePoint 2010 Site Structure Using PowerShell

Posted on 14 CommentsPosted in Scripts, SharePoint 2010

In a previous post I detailed how to use PowerShell to perform what would be otherwise done using PSConfig to create an initial SharePoint Farm. In this post I will continue the example and show how to create your web applications using a simple XML configuration file and a reusable script. Like the previous example I have a very basic XML file that defines my web application structure. In this example I’ve included not only […]

Deleting Orphaned Event Receivers using PowerShell

Posted on 4 CommentsPosted in Article, Scripts, SharePoint 2007

While looking through the event logs at a client of mine the other day I came across an odd error that was occurring regularly.  Apparently they had developed a Feature which contained an Event Receiver which was programmatically bound to a series of lists.  As time went on their requirements changed so they deleted the event receiver class.  Problem was that the binding to the lists still exists so every time an item was updated […]

Change Password Script

Posted on 3 CommentsPosted in Scripts, SharePoint 2007

I’d been meaning to post this for quite some time but just haven’t gotten around to it – as paranoid administrators we often find the need to change our service account passwords and doing so with a product like SharePoint can be a rather significant effort if you consider all the various accounts that may be used in a least privileges model.  If you’re just about to make hit this situation you’re likely to do […]

Sample Install Script

Posted on 34 CommentsPosted in Scripts

I’ve mentioned a few times on my blog that I was going to post a sample install script which can be used to set up and configure a basic MOSS install (will also work with WSS but you’ll need to pull a lot out) and now I’ve finally got around to actually doing it. I’ve created a zip file which contains two files that you can download. The first file, variables.bat, simply contains the core […]