Setting Metadata

Posted on 5 CommentsPosted in SharePoint 2007, STSADM Commands

In my last post I mentioned a project which required me to move documents from one list to another list in a different farm one folder at a time.  Along with that was a requirement to set various field values (metadata) based on patterns in the folder name and/or filename.  I needed a reasonably flexible way to accomplish this considering that the client didn’t actually have a clue as to what they really wanted the […]

Import Site Columns

Posted on 18 CommentsPosted in SharePoint 2007, STSADM Commands

In my last post I wrote about a command that I created to export site columns to an xml file because I needed the data for a Feature I was working on. But what if you just want to create a column using the exported results and for whatever reason you don’t want to create a Feature? I figured it would take me about 2 minutes to throw together an import command that would take […]

Export Site Columns

Posted on 9 CommentsPosted in SharePoint 2007, STSADM Commands

As I mentioned in my previous post about the gl-exportcontenttypes command I need to be able to quickly and easily get the CAML necessary to recreate site columns in a Feature. To do this I created a quick and dirty command called gl-exportsitecolumns. The code for this is extremely simple – I just get the SPField objects of interest based on the parameters passed in and dump out the SchemaXml property – that’s it: 1: […]

Export Content Types

Posted on 24 CommentsPosted in SharePoint 2007, STSADM Commands

I was recently working on a client project where there was an environment already setup with several custom content types and custom site columns that had been created. We wanted to reverse engineer those content types and columns so that we could create a Feature that could be used to deploy them into the various environments. I poked around a bit and couldn’t find anything that would simply give me the CAML that I needed […]

Export, Import, and Update List Fields

Posted on 9 CommentsPosted in SharePoint 2007, STSADM Commands

One thing that’s been hanging over my head for a while is what to do about the Site Directory. The first problem was to get the business users to decide on where it should live (the master site directory that is) and what columns (or meta data) should be part of the directory (either new columns or changes to existing columns). Once I finally got that information I had to solve my second problem which […]

Apply Upgrade Area Url Mappings

Posted on 1 CommentPosted in SharePoint 2007, STSADM Commands

As I mentioned in my previous post (Replace Field Values) I’m currently trying to solve the issue of broken links throughout the various sites that I’ve upgraded and moved around. The gl-replacefieldvalues command was the first of three that I’ve created. This second command, called gl-applyupgradeareaurlmappings, is very similar to the gl-replacefieldvalues command but it is a bit specialized. I’ve created this command to address the list items in the special Upgrade Area Url Mappings […]

Replace Field Values

Posted on 19 CommentsPosted in SharePoint 2007, STSADM Commands

Because I’m doing so much moving around of the post-upgraded sites I’m running into lots of issues with broken links. In an attempt to solve this problem I’ve begun working on 3 commands. This first command, gl-replacefieldvalues, will take in a search string and a replacement string and modify every list item where a match is made. The searching can be scoped to the entire farm, a single web application, a single site collection (and […]

Delete List Field

Posted on 3 CommentsPosted in SharePoint 2007, STSADM Commands

One of the things I’ve been working on recently was trying to get the site directory into a useable state post upgrade. The main issue I needed to address was that the upgrade resulted in duplicate columns for Division and Region. The duplication was because the default Site Directory template creates columns with a display name of Division (and Region) but the internal name is DivisionMulti (and RegionMulti). So when the upgrade moved the source […]