Programmatically Setting SharePoint 2010 Calendar Overlays

Posted on 43 CommentsPosted in PowerShell Cmdlets, SharePoint 2010

I recently did a project where my client needed several calendars provisioned via a Feature Receiver when a particular type of Site Collection was created; they had one primary calendar and they wanted all the other calendars to be overlaid onto the primary one using SharePoint 2010’s Calendar overlay capabilities. Here’s a quick summary of this feature if you’re not familiar with it. When you are looking at a calendar you should notice that there […]

Setting List Properties using STSADM

Posted on 2 CommentsPosted in SharePoint 2007, STSADM Commands

Recently I had a reader of my blog send me a modified version of my gl-addlist command in which he added some additional properties to set a couple of the SPList properties (specifically the versioning settings).  In thinking about this I decided that it might be helpful to have a command specifically for setting most of the SPList properties rather than try to incorporate them into a more general command like the gl-addlist command so […]

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

Create a Publishing Page via STSADM

Posted on 15 CommentsPosted in SharePoint 2007, STSADM Commands

I’m working on a project which is going to require the creation of about a hundred publishing pages which were going to have to be created by hand.  I really didn’t want to have to sit there going through the UI to create all those pages so I threw together a new STSADM command that I could use via a script to create the pages: gl-createpublishingpage. Creating publishing pages via code is pretty simple – […]

Enumerating Email Enabled Lists via STSADM

Posted on 6 CommentsPosted in SharePoint 2007, STSADM Commands

I can’t really take much credit for this command – fellow MVP Todd Klindt had a custom console application that he’d created to do the same thing but it was lacking some functionality and was not created as an stsadm extension.  He asked if I’d mind reworking it to allow different scopes and to make it an extension.  Fortunately I had some time so I took a look at his code to get this one […]

Enabling Audience Targeting on a List

Posted on 3 CommentsPosted in SharePoint 2007, STSADM Commands

I thought I was done documenting my audience related STSADM commands and then I realized that I had completely forgotten one.  The first audience related command I had created was to enable audience targeting on a list – I called it gl-listaudiencetargeting.  I needed this because my current project had tons of lists that that needed audience targeting turned on.  Eventually these lists were added via a Feature but initially I did it via the […]

Setting List Content Types using STSADM

Posted on 10 CommentsPosted in SharePoint 2007, STSADM Commands

Sometimes when I’m working on a new Feature I find it easier to take certain snippets that I need to test and pull them out into custom STSADM commands.  This enables me to quickly and easily test the core code and without having to go through all the deployment steps.  It was for this purpose that I originally created this new command, gl-setlistcontenttypes.  I did find later that the command ended up being real useful […]