Transcript Slide 1
Administering Microsoft SharePoint
Products and Technologies 2007
Using STSADM
Todd Klindt
Windows SharePoint Services MVP
Solanite Consulting, Inc.
[email protected]
WSS MVP since 2006
Speaker, writer, consultant, aquarius
Personal Blog
www.toddklindt.com/blog
Company web site
www.solanite.com
E-mail
[email protected]
Stayed up too late last night.
Introduction to STSADM and how to use it
Common STSADM operations
Backup and restore with STSADM
Advanced operations with STSADM
Things that can only be done with STSADM
What to do when you have mastered
STSADM
Talk about how incredibly tall the Burj Dubai
is
Command line tool on SharePoint servers
Must be run locally by a local administrator
Not interactive, makes it a perfect candidate for
scripting
Hidden in the 12 Hive
C:\Program Files\Common Files\Microsoft
Shared\web server extensions\12\BIN
Several ways to make it easier to access
Add to path
Create cmd.exe shortcut
Batch file
Environment variable
There are 184 operations in MOSS
To find an operation, pipe STSADM through find
Can be used for some common daily tasks
Site maintenance
Createsite/ Deletesite/ Enumsites/ Createsiteinnewdb/
Enumsubwebs
Web maintenance
Createweb/ Deleteweb/ Renameweb
User maintenance
Adduser/ Deleteuser/ Enumusers/ Migrateuser
Setting up your environment
and common tasks
demo
Can be used to backup SharePoint at many levels
Backup operation works at the farm level
Compatible with backups made in Central Admin
Backup operation can also back up at the Site
Collection level
Export and Import replace smigrate.exe and work at
the web level
More granular than backup and restore
Import does not overwrite destination
Choose the level that is appropriate for the issue you are
trying to address, catastrophic recovery or site and
document backup
Since it’s CLI it is great for scripting
Use AT.EXE or Task Scheduler to schedule your
batch file
Same flexibility, backup farm or individual site
collections
Backup and Restore
demo
Use addtemplate and enumtemplate to manipulate
templates
Enumtemplate will only show user added
templates
Web Parts – Addwppack/ deploywppack/
enumwppacks/ retractwppack
Features – Activatefeature/ deactivatefeature/
installfeature/ scanforfeatures/ uninstallfeature
Solutions – Addsolution/ deploysolution/
displaysolution/ enumsolutions/ retractsolution/
upgradesolution
Content Databases – Addconentdb/
deletecontentdb/ enumcontentdbs
Managed paths – Addpath/ Deletepath
Only need to add paths, exclusions are gone
Web applications – Extendvs/ unextendvs
Zones and alternate access mappings –
Enumzoneurls/ addzoneurl/ deletezoneurl
/geturlzone
Manage timer jobs with deletessptimerjob
Manage web application policies with
Managepolicypermissionlevel
A lot of power lies in the Setproperty and
Getproperty operations
days-to-show-new-icon sets length of time the
New! Icon shows up
job-immediate-alerts sets the polling time for
immediate timer jobs
max-template-document-size sets maximum
size for site and list templates
large-file-chunk-size sets the chunk size of
blobs between the WFE and the SQL server
execadmsvcjobs to force the Time Job
Service to execute your job immediately
createsiteinnewdb to create a new Site
Collection in its own DB
Mergecontentdbs to move Site Collections
around
Setadminport to change Central Admin port
Databaserepair to clean out orphaned
objects
STSADM operations can be added via
custom code
Consists of two part
Create XML file to define new operations in
12\Config
Create assembly and place in Global Assembly
Cache
Can be deployed as Solution
Couple STSADM with PowerShell
Use PowerShell to parse XML output
Use to loop through STSADM operations
Examples on Codeplex
My Blog
http://www.toddklindt.com/blog
Real World SharePoint
http://www.wrox.com/WileyCDA/WroxTitle/productCd0470168358.html
STSADM article in TechNet Magazine
http://www.microsoft.com/technet/technetmag/issues/2007/01/Co
mmandPrompt/
Gary LaPointe’s STSADM extensions
http://stsadm.blogspot.com
STSADM Extension project
http://www.codeplex.com
STSADM White Paper
http://www.mindsharp.com
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.