Visit My Sponsors - SharePointAds







Easily Secure SharePoint Documents
Based on Metadata. By Titus Labs.



SharePoint Joel's SharePoint Land > Posts > Automating and Scripting SharePoint Administration
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

Comments

There are no comments yet for this post.

 Social Comments

Post Comments to your Facebook Profile Post comments to twitter or on SharePointJoel.com
blog comments powered by Disqus
Share

Blog (RSS)

Follow on Networked Blogs Facebook

Recent Comments

Powered by Disqus
Subscribe by Email or RSS

Contact me

 20 Recent Posts

Effective SharePoint 2010 Upgrade Q&AUse SHIFT+ENTER to open the menu (new window).New
How Microsoft Is Doing Records ManagementUse SHIFT+ENTER to open the menu (new window).New
Free Webcast: Get to SharePoint 2010 – Strategies for Effective Upgrades and MigrationsUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010 and SQL Hotfix DependenciesUse SHIFT+ENTER to open the menu (new window).
Aptillon SharePoint Consulting GeniusUse SHIFT+ENTER to open the menu (new window).
Really, A SharePoint Training Cruise?Use SHIFT+ENTER to open the menu (new window).
Updated Guidance on SharePoint 2010 Upgrade and the FAB 40 application templatesUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010 Upgrade Decision TreeUse SHIFT+ENTER to open the menu (new window).
We’re Serious - Don’t Modify Your Database or Face ConsequencesUse SHIFT+ENTER to open the menu (new window).
Remove/Deactivate a missing feature for a cleaner upgradeUse SHIFT+ENTER to open the menu (new window).
Free Webcast: Best Practices for Upgrading and Migrating to SharePoint 2010Use SHIFT+ENTER to open the menu (new window).
I’m in Utah today at the MOSSPit (SLC UG)Use SHIFT+ENTER to open the menu (new window).
Wish you had free end user training incorporated into your SharePoint environment?Use SHIFT+ENTER to open the menu (new window).
SharePoint Virtual Expo Networking EventUse SHIFT+ENTER to open the menu (new window).
Planning SharePoint Deployments with RACIUse SHIFT+ENTER to open the menu (new window).
Reaching out to the SharePoint Portuguese CommunityUse SHIFT+ENTER to open the menu (new window).
Kudos to Owen Allen @owenallenUse SHIFT+ENTER to open the menu (new window).
Practical Windows PowerShell for SharePoint 2010Use SHIFT+ENTER to open the menu (new window).
Project Server 2010 and SharePoint 2010 CoexistenceUse SHIFT+ENTER to open the menu (new window).
What’s Next in SharePoint LandUse SHIFT+ENTER to open the menu (new window).