Category: STSADM Commands

A SharePoint deployment isn’t much of a deployment if there are no web applications. A web application in SharePoint contains one or more content databases, each of which can contain one or more site collections, etc., etc. The SPWebApplication class has tons of methods and properties for directly or indirectly manipulating all things related to web applications – you can do backups, add content databases and site collections, set alert settings, manipulate the web.config file, […]

Ever since I released my PowerShell CmdLets I’ve been unhappy about my choice to use the -gl in the name of the cmdlet. I felt it would be useful for numerous reasons but I didn’t like that it “broke the rules” of cmdlet naming conventions. And then Microsoft announced, via the PowerShell team blog, that some code will be added to V2 to enforce the prescribed naming conventions. You can find the post here: http://blogs.msdn.com/powershell/archive/2009/04/16/increasing-visibility-of-cmdlet-design-guidelines.aspx. […]

There are several core SharePoint objects that PowerShell programmers may need to work with in order to manipulate SharePoint via PowerShell scripts. Getting these objects is pretty simple but not all that intuitive to users who are still trying to learn PowerShell and the SharePoint API. The SPFarm object is the top level object for working with SharePoint and it provides access to all the global settings for all servers, services, and solutions that are […]

I recently posted about exporting audiences using my gl-exportaudiences STSADM command. Of course an export wouldn’t be of much use if you didn’t also have an import so I give you gl-importaudiences. Developing this was really easy as I already had code that created an audience and its associated rules. All I had to do was read in the source XML file, do a little refactoring of the audience creation code and then call the […]

I’d been wanting to build an export and import command for Audiences for quite some time but just haven’t gotten around to it. I’m currently looking for a good sample command to build during a possible talk at the next Best Practices conference so I decided to give this one a whack considering that I already had a good chunk of the code written and just needed to repurpose it. I don’t know if I’ll […]

I can’t actually take credit for this particular command – in fact I’ve never configured SSO so I personally don’t know much about it. I got the code from Stef van Hooijdonk who graciously provided the code he produced. I made a few minor changes to Stef’s code just to bring it in line with the rest of my code but otherwise it’s as was provided to me – as such I’m not really prepared […]

I know, I know, I’m way behind on documenting my PowerShell cmdlets – I will be striving to get them done as soon as possible. I’ve already documented one of them, the Get-SPSite cmdlet, and I will now continue with the Get-SPWeb cmdlet. Hopefully I’ll be able to wrap up the others much quicker as they are a lot simpler – then I can finally start building new ones 🙂 Like the Get-SPSite cmdlet the […]

I just saw this post on the SharePoint forums: http://social.msdn.microsoft.com/Forums/en-US/sharepointgeneral/thread/e9cd9836-5a50-42b3-bf2f-02338a3168f3 – it appears that there’s a possibility for data corruption when using the STSADM mergecontentdb command. The post details a few things you can do to reduce the possibility of corruption when using the command but it would appear that the hidden message is to use Backup/Restore until a fix is released.

This has come up in various conversations recently so I figured I’d write up a short post about it. When trying to obtain an SPWeb object there are a couple of different options available using members of an SPSite instance. The first, and more common, is the OpenWeb() method and the second is using the AllWebs[] property collection. Here’s the problem I have with OpenWeb() (specifically the overload that takes no arguments) – consider the […]

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