200 likes | 557 Views
OFC 312. Administering Microsoft SharePoint Products and Technologies 2007 Using STSADM. Todd Klindt. Session Objectives and Agenda. Introduction to STSADM and how to use it. Common STSADM operations. Backup and restore with STSADM. Advanced operations with STSADM.
E N D
OFC 312 Administering Microsoft SharePoint Products and Technologies 2007 Using STSADM Todd Klindt
Session Objectives and Agenda 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
An Introduction to STSADM • Command line tool on Web front ends • 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
Common STSADM Operations • There are 184 operations in Microsoft Office SharePoint Server • 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
demo Setting Up Your Environment and Common Tasks
Backup and Recovery with STSADM • Can be used to back SharePoint Server 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
Scheduling a Backup with STSADM • Since it’s CLI, it’s great for scripting • Use AT.EXE or Task Scheduler to schedule your batch file • Same flexibility, backup farm or individual site collections
demo Backup and Restore
Can Manipulate Other Objects with STSADM • Use addtemplate and enumtemplateto 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
More Administrative Objects • 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
Things You Can Only Do with STSADM • 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
Mastered STSADM. Now What? • STSADM operations can be added via custom code • Consists of two parts • 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 Windows PowerShell • Use PowerShell to parse XML output • Use to loop through STSADM operations • Examples on CodePlex
Resources Technical Communities, Webcasts, Blogs, Chats & User Groups http://www.microsoft.com/communities/default.mspx Microsoft Learning and Certification http://www.microsoft.com/learning/default.mspx Microsoft Developer Network (MSDN) & TechNet http://microsoft.com/msdn http://microsoft.com/technet Trial Software and Virtual Labs http://www.microsoft.com/technet/downloads/trials/default.mspx
Announcing! The Microsoft Office SharePoint Conference 2008 March 3rd – 6th 2008 at the Washington State Convention and Trade Center, Seattle, USA Sign up for more information and registration notification at http://www.mssharepointconference.com