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 […]

Deactivating Features at Different Scopes Using STSADM

Posted on 2 CommentsPosted in SharePoint 2007, STSADM Commands

I just posted about one of my new commands, gl-activatefeature, which covers activating features at different scopes using STSADM.  That article covers all the code necessary to not only implement the activation, but also the deactivation.  So creating the next command, gl-deactivatefeature, was as simple as copying the container code for the activation command and changing a few simple lines of code.  This command works exactly like the other except that it deactivates the Feature […]

Activating Features at Different Scopes Using STSADM

Posted on 11 CommentsPosted in SharePoint 2007, STSADM Commands

How many times have you had a Feature, either out-of-the-box or custom, that you have needed to activate at lots of different scopes or re-activate at lots of different scopes?  To do this you may have found a way to get the list of site collections or webs and then somehow used that list in conjunction with the STSADM activatefeature command or worse you manually went to every site or web and manually activated or […]

A Better execadmsvcjobs STSADM Command

Posted on 5 CommentsPosted in SharePoint 2007, STSADM Commands

This is something that’s been bugging me for a long time – when you run the out of the box execadmsvcjobs command on a server it only ensures that pending jobs on that one server are executed – when it completes it doesn’t mean that jobs on other servers in the farm have completed.  This gets real annoying when you are using a script to deploy solution because end up getting errors about pending timer […]

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 […]

Changing the Application Pool Identity via STSADM

Posted on 2 CommentsPosted in SharePoint 2007, STSADM Commands

This past week I presented at the local Colorado Springs SharePoint User Group meeting on using and customizing STSADM.  The talk was really less about STSADM and more about SharePoint administration tips, tricks, and best practices – but we did create a new STSADM command from scratch during the meeting.  I’ve taken what we did during the meeting and reworked it to add proper validation and help documentation and have included it in my download […]

Listing Event Receivers using STSADM

Posted on Leave a commentPosted in SharePoint 2007, STSADM Commands

This post wraps up my event receiver posts.  I just finished documenting the gl-addeventreceiver and gl-deleteeventreceiver commands and this final command would be gl-enumeventreceivers. This command is the simplest of the three as it’s just looping through all the event receivers belonging to the specified target and dumping the results out as XML.  I’ve tried to structure the XML so that it conforms to the CAML schema therefore allowing the results to be put into […]

Deleting an Event Receiver using STSADM

Posted on Leave a commentPosted in SharePoint 2007, STSADM Commands

I had some time so I decided to add the counterparts to the gl-addeventreceiver command that I just published.  I created two new commands, gl-deleteeventreceiver and gl-enumeventreceivers.  This post will cover the delete command and I’ll go over the enum command in my next post. From a code perspective the delete command is very similar to the add command.  The main difference (aside from the obvious call to Delete instead of Add) is that I’ve […]

Adding Event Receivers using STSADM

Posted on 1 CommentPosted in SharePoint 2007, STSADM Commands

A few months ago I created a CodePlex project that allows you to configure a library to allow the storing of web part page history.  The project at its core used three item event receivers to listen to certain key events and either backup the page or restore the page based on the event.  Recently I was thinking about what might be the best way to allow people to script the settings that enable the […]