Setting the Master Page Using STSADM

Posted on 15 CommentsPosted in SharePoint 2007, STSADM Commands

I’d thought about building an STSADM command to enable setting the master page of a site for quite a while but had opted not to do it simply out of principle – it’s generally a better idea to do this via a Feature and I didn’t really want to promote a bad practice.  Ultimately though I had to concede that there are administrators who will not have the luxury of having developers who can create […]

Don’t Use the PrepareToMove STSADM Command

Posted on Posted in SharePoint 2007, STSADM Commands

Todd Carter just published an interesting post about when to use, and more appropriately, not use the preparetomove command:  Essentially if you have at least the Infrastructure Update (IU) installed then using this command will cause you issues.  See Todd’s post for more details.

SPDisposeCheck Released

Posted on 2 CommentsPosted in SharePoint 2007

This is a must have!  If you do any kind of SharePoint development then you should strongly consider downloading the recently released SPDisposeCheck tool:  This tool analyzes your assemblies and helps to identify potential memory leaks.  I should note that you need to truly evaluate each result because not every item should be considered a show stopper – you need to understand the various dispose patterns and should use this tool as a quick […]

Working with SPSite(Info) Objects Using PowerShell

Posted on 6 CommentsPosted in PowerShell Cmdlets, SharePoint 2007

One of the first PowerShell cmdlets I built, Get-SPSite, addresses some common issues found with working with SPSite objects.  I struggled with how I could provide a means to quickly and easily get SPSite objects while at the same time helping administrators so they don’t have to worry (as much) about object disposal.  For those that aren’t familiar with the SPSite object (Microsoft.SharePoint.SPSite), it’s the equivalent programmatic element for working with site collections. What I […]

Replacing Navigation URLs Using STSADM

Posted on 14 CommentsPosted in SharePoint 2007, STSADM Commands

I was working on a project last Fall where a client of mine had a single site collection for their entire document library which was expected to be over 1TB.  As a result of the large size of the site collection we decided to break it up into multiple site collections each contained within their own content database (we ended up with 12 in the end).  The problem was that when we migrated all the […]

Recalculating Usage Statistics via STSADM or PowerShell

Posted on 8 CommentsPosted in PowerShell Cmdlets, SharePoint 2007, STSADM Commands

I was perusing through the SharePoint forums the other day and I came across an issue that someone was having with the usage statistics information for their My Sites site collections.  When they viewed the usage data (~site/_layouts/usage.aspx) they were seeing incorrect information.  I’m not really sure why the numbers were wrong but fixing them turned out to be pretty easy.  There’s a public method called “RecalculateStorageUsed” that, when called, will recalculate the usage statistics […]

Initial Release of My SharePoint PowerShell Cmdlets

Posted on 10 CommentsPosted in PowerShell Cmdlets, SharePoint 2007

Update 4/25/2009: I’ve removed the “-gl” suffix from all my cmdlets – any examples using the -gl in the cmdlet name should be updated. If you’ve been following my blog you’ll remember that I recently pushed out a “beta” build of some SharePoint PowerShell Cmdlets for some initial feedback and reviews.  We’ll I’ve gone ahead and incorporated the feedback that I received and I am now officially releasing the first version of my cmdlets.  The […]

gl-fixpagecontact Deprecated!!!

Posted on Posted in SharePoint 2007, STSADM Commands

Woohoo! – I finally get to deprecate one of my commands – after creating and publishing 135 commands I discovered today that the August Cumulative Update fixes the issue that my gl-fixpagecontact command sought to address.  If you look back at the post for that command you can see that there was a bug with the product which resulted in a user not found exception being thrown when looking at the settings of a publishing […]

Ensuring a Valid SPContext via Feature Activation

Posted on Posted in Article, SharePoint 2007

I’ve been meaning to blog about this for a while but just haven’t gotten around to it.  Have you ever needed to add a web part to a page during Feature activation?  Of course you can do this declaratively using CAML but I usually prefer to do this stuff via code.  The challenge is that occasionally you will need to activate the Feature outside the context of a web request – such as via STSADM […]

My New PowerShell Cmdlets for SharePoint 2007: Feedback Requested!

Posted on 10 CommentsPosted in PowerShell Cmdlets, SharePoint 2007

Okay all you PowerShell superstars out there that have been using my STSADM commands – I need your help!  I’ve decided to teach myself PowerShell and see if I can’t leverage some of my STSADM experiences/code to expose some SharePoint functionality and I need some people who really know this PowerShell stuff to please take a look at what I’ve got so far and let me know if I’m way off base or not. My […]