SharePoint Joel's SharePoint Land > Categories
Automating and Scripting SharePoint Administration
First off let me thank Todd Klindt, my good buddy who's shown me the light on the fact that IT Pro geeks really get into STSADM and the fact that you can get good scores showing off the black command line screen for over an hour.
 
I've used a few of his slides as inspiration (plus a bit, thanks buddy) for my talk here in Teched South East Asia.  Wish he was here doing this himself.  Maybe next year.
 
Here's my Teched SEA Automating SharePoint Administration with STSADM deck.  Click "cancel" if you get prompted.
 
For my Scripted Administration talk I divided it up into 3 main sections.  1) Understanding the command line SharePoint Tools and other cmd line tools, 2) Understanding the containment hierarchy and it's relationship to the stsadm commands 3) Things you can only do in STSADM and STSADM Extensions and Powershell
 
SharePoint Command Line Tools (Scripted Deployment more in previous post.)
  • Setup.exe
    • Install bits
    • Use Answer file to provide needed details to automate.
  • Psconfig.exe
    • Create or Connect to config db
       Start or stop services
       Change server roles
  • STSAdm.exe
    • Create Web Apps
    • Create Site Collections and sites
    • Backup/Restore
    • Import/Export
    • Maintenance and management
Non SharePoint Command Line Tools
 
IISWeb - query/create/delete empty IIS Web Applications (IIS Web Sites)
 
IISApp - List application pools with process id and use to recycle
 
Copy/Xcopy/Robocopy - Copy and Manage files.  There are various ways to connect and bulk upload.  Bamboo solutions has some nice very cheap import tools.  Beyond this there are a ton of third party tools for migrating data into SharePoint from BinaryTree, Tzunami, Quest, AvePoint and on and on.  Don't forget Excel and Access and interfaces for getting list data into SharePoint.
 
Containment Hierarchy Creation and Management with Cmline tools
 
Farm
      (Setup.exe and Psconfig.exe) Setconfigdb, AddSolution (for farm solutions/features and below)
Servers
      (Setup.exe and Psconfig.exe) setconfigDB, addServer
Web Applications
      extendVS, extendVSinfarm, createAdminVS, createSSP, addcontentDB, AddZoneUrl, Managepolicypermissionlevel
Databases
     createDATABASE, createSSP, setconfigDB,
Site Collections (Site, SPSite)
     CreateSITE, CreateSITEinnewdb, AddUser, AddGroup
 Sites (Web, SubWeb, SPWeb)
     createWEB
Lists
     (automate list creation through list and site templates) (or with STSADM extensions or Access or Excel to add entire custom lists)
Items
    (copy, xcopy, and robocopy can be used to add documents, use Excel and Access to insert or update items.)
Maintenance/Operations
 
Farm
   Quiesefarm, listlogginglevels, setlogginglevel, backuphistory
Servers
   renameServer
Web Applications
   preparetomove, unextendVS, addpath, editSSP
Databases
   DATABASErepair, preparetomove, AddContentDB
Site Collections (Site, SPSite)
   CreateSITE, CreateSITEinnewdb, GetSITElock, enumSITES
Sites (Web, SubWeb, SPWeb)
   createWEB, renameWeb, enumSUBWEBS
Lists
   forcedeleteLIST
Items
   blockedFILElist
 
Advanced Cmdline Admin
 
STSADM Extensions - Gary Lapoint's STSADM extensions are the most verbose list of extensions anywhere.  Tons of em.  My favorite... Createsiteindb (create site collection in existing database without all that unnecessary jumping around.)
 
Powershell - There are lots of powershell references out there now.  There's one codeplex community project at http://www.codeplex.com/pssharepoint  and Darrin Bishop (blog) did a session at TechEd called "ehancing automation with SharePoint" that I recommend.  There are quite a few other powershell projects on codeplex.
 
Caution: All those dispose concerns you might have heard about in development applies to anything you're doing in Powershell.  There can be common mistakes with not properly disposing when walking the site tree.
 
Also check out SP1 and the Infrastructure update and future updates to include additional things... such as MergeContentdbs the most useful STSADM command for managing your databases.  You might not have heard of a SharePoint Admin Toolkit built by Microsoft.  The Move, Lock, and Delete in Batch in a web UI is very nice.
 
Other SharePoint Admin Tools should also be considered if you're having manageability issues.  There is a lot of good work being done by third parties to make admin easier.
 
Additional References
 

TechNet STSADM Reference and Poster

Minsharp STSADM References (premium content) Mindsharp.com

Todd Klindt MVP blog

Ben Curry’s “SharePoint Admin Companion” (MS Press Book)

Gary Lapoint’s STSADM extensions

New SharePoint Admin and Management Tools
I hope you saw the posting on the SharePoint Team blog, or Zach's post on the SharePoint Admin Toolkit.
 
This is one of a few Admin Tools that really help you batch changes.  This one appears to really be focused on batch changing site collections.  LOVE IT.  Thanks Zach, it's about time :)  Just kidding.  I'm sure we'll see more out of this Admin toolkit and we love what you're doing so keep it up.
 
SharePoint Admin Toolkit
 
Batch Site Manager - Batch Locks, Moves, and Deletes for site collections in a nice GUI (100 at a time).
 
UpdateAlert - (STSADM extension) allows you to update alerts when your AAMs change (alternate access mappings or zones).
 
I looked at the white paper and highly recommend it for IT Pros.  Even if you don't use the tool or don't plan to, I was impressed by some good info on reference information on related STSADM commands with good resources related to the topics of Site Deletes, Moves, and Locks.  Move is very misunderstood.  This move is all about safely moving site collections between databases using timer jobs.  Very cool.  Don't forget the commands that came in SP1 related to the STSADM command mergecontentdbs.  Good info there as well.  If you aren't at that stage, it's still a good reference... if you're large you will eventually need to know this info.
 
Microsoft SAT SharePoint Cross Site Configurator 1.0 - For standardization and consistency of master pages, auditing, content types and more. What else do you want to use it for?
 
I love free tools, but sometimes you need to look for tools where you can even do more and get support.  Here's some suggestions MOST of which are very NEW.  Even if you've looked, I suggest you look again at these released/supported tools.
 
 
DeliverPoint: Permissions is a new tool focused on user security and permissions in SharePoint.  It's also a batch focused tool for making changes very pinpointed or in larger groups.  Moving, Deleting, Searching for User or Object permissions, and Cleanup/Dead Account Removal.  There's a 14 day trial download.
 
AvePoint DocAve 4.5 SharePoint Administrator - Centralized multi farm administration of configuration.  "propagate configuration and security permissions to web applications, sites, folders, and lists in bulk, resulting in quicker time-to-value of each update."  I got a demo of this from TJ in Dubai.  It was very impressive and I'd take a second look if you have or haven't seen it.  There's an eval copy on their site.
 
Quest Site Administrator - reporting on storage, usage, manage quotas and locks and enforce configuration and settings in "policies" in a centralized UI.  (Poorly named, it isn't just site level managment it's more farm wide management of sites.)
 
iDevFactory Universal SharePoint Manager - Centralized management UI exposing permissions, security, and easy console for managing settings and configuration.