STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 with Joel Oleson

  • 5,090 views
Uploaded on

Automating SharePoint Administration with the built in tools in the box. Tips, tricks, and a lot of information you can't find elsewhere. Kudos to Todd Klindt for a few slides. Majority of deck and …

Automating SharePoint Administration with the built in tools in the box. Tips, tricks, and a lot of information you can't find elsewhere. Kudos to Todd Klindt for a few slides. Majority of deck and presentation by Joel Oleson

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,090
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
0
Comments
0
Likes
19

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • 06/06/09 16:31 © 2007 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.

Transcript

  • 1. STSADM – Automating SharePoint Administration Joel Oleson Sr. Technical Product Manager/Sr. Consultant http://www.sharepointjoel.com Todd Klindt (Contributor) http://www.toddklindt.com/blog Session Code: 322
  • 2. Who is Joel Oleson?
    • 7+ Year SharePoint Veteran
    • www.sharepointjoel.com
    • Be my friend: Facebook, Linked in
  • 3. Session Objectives and Agenda Introduction to Scripted Administration Creating the Containment Hierarchy STSADM demo extravaganza Advanced operations with STSADM Things that can only be done with STSADM
  • 4.  
  • 5. Scripted SharePoint Administration
  • 6. PSConfig.exe -?
    • Usage:
    • PSCONFIG.EXE -cmd <Command> [Parameters]
    • PSCONFIG.EXE -help [Command]
    • PSCONFIG.EXE -?
    • Commands:
    • setup
    • standaloneconfig
    • configdb
    • helpcollections
    • secureresources
    • services
    • installfeatures
    • adminvs
    • upgrade
    • evalprovision
    • applicationcontent
    • quiet
  • 7. Setup.exe -?
    • Usage:
    • SETUP.EXE -cmd <Command> [Parameters]
    • SETUP.EXE -help [Command]
    • SETUP.EXE -?
    • Commands:
    • config [path and full path to file (config.xml)]
    • repair [Product ID]
    • modify [Product ID]
    • uninstall [Product ID]
    • Example:
    • C:MOSSsetup.exe /config C:MOSSconfig.xml
    • C:MOSSsetup.exe /uninstall ID (use ID from config.xml)
  • 8. STSADM.EXE -help
    • Usage:
    • stsadm.exe -o <operation> [<parameters>]
    • stsadm.exe -help [<operation>]
    • Operations:
    • activatefeature
    • activateformtemplate
    • addalternatedomain
    • addcontentdb addsolution
    • backup
    • ...
  • 9. STSADM Usage
  • 10. Common SharePoint Command Line Tools
  • 11. 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 FilesCommon FilesMicrosoft Sharedweb server extensions12BIN
    • Several ways to make it easier to access
      • Add to path
      • Create cmd.exe shortcut
      • Batch file
      • Environment variable
  • 12. 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
  • 13. Common Operations
    • Create
    • Delete
    • Enum (Enumerate or Provide List in XML)
    • Rename
    • Add
    • Retract
    • Set
    • Get
    • Update
    • Upgrade
  • 14. Create Web Application
  • 15. Containment Hierarchy
  • 16. STSAdm Create/Add Operations
  • 17. STSAdm Maintenance Operations
  • 18. Backup and Recovery with STSADM
    • Can be used to back up 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
  • 19. Scheduling a Backup with STSADM
    • Use AT.EXE or Task Scheduler to schedule your batch file
    • Backup farm or individual site collections
  • 20. Scheduled Task
  • 21. Understand the Scope
  • 22. Can Manipulate Other Objects with STSADM
    • 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
  • 23. 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
  • 24. 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
  • 25.  
  • 26. Mastered STSADM. Now What?
    • STSADM Extensions are the answer…
    • Operations can be added via solution deployments (.wsp)
      • Consists of two parts
        • Create XML file to define new operations in 12Config
        • Create assembly and place in Global Assembly Cache
    • Couple STSADM with Windows PowerShell
      • Use PowerShell to parse XML output
      • Use to loop through STSADM operations
      • Examples on CodePlex
  • 27. Powershell with SharePoint Admin
    • Codeplex Powershell SharePoint Provider
      • Codeplex.com/PSSharePoint
    • IIS 7 cmdlets
    • Windows 2008 Admin cmdlets
    • Caution: All of the dispose rules apply to powershell.
  • 28. Resources
    • 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
  • 29.  
  • 30. Thank YOU!!!
  • 31. Notes
    • In addition to the Walk-in and Title slides, the following slides are required
    • Please add to your content and include these in your final presentation
    NEXT: <next slide title>
  • 32. Resources
    • www.techedsea.com
      • Event photos, presentation slides
    • http://www.microsoft.com/ malaysia/technet/
      • Evaluation licenses, pre-released products, and MORE!
    • http://www.microsoft.com/malaysia/msdn/
      • Developer’s Kit, Licenses, and MORE!
      • http://blogs.msdn.com/malaysia
      • MSDN Malaysia Blog
      • http://blogs.msdn.com/tolong
      • Blog about all things .NET
    Required slide
  • 33. Participating Microsoft Certified Partners for Learning Solutions
    • VISIT the MS Learning Pavilion & MS Press booth for great Training & Certification offers
    • SIGN-UP for Training, MS Press & Certification offers and enjoy the following
      • Check-out the MS Learning Offer Pack in your event kit for EXCLUSIVE offers
      • FREE MeasureUp Practice Test worth US$50 each
      • Daily lucky draws of prizes worth RM2,000
    • ATTEND Microsoft Learning sessions and win mystery prizes :
      • “ New Generation of Certification Track” @ 2:15 – 3:00pm | 12 August | Room 302-303
      • “ Light & Easy” with Microsoft Learning on 11-13 August | Tech•Ed After Hours
  • 34. Download presentation slides Required slide Presentation slides will be available for download at the Tech · Ed Internet Café or after the event at: www.techedsea.com
  • 35. Did you like this session? Required slide Please complete the track evaluation form and return it to the track managers on your way out… You may be a lucky winner of some cool prizes!
  • 36. We value your feedback! Required slide
    • Please remember to complete the overall conference evaluation form (in your bag) and return it to the Handout Counter on the last day in return for:
    • Windows Server 2008 Evaluation kit
    • Visual Studio 2008 Evaluation kit
    • ** Evaluation kits will be given out on a first-come-first-serve basis, while supplies last
  • 37. © 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.
  • 38. Demo Title Name Title Company demo
  • 39. Slide for Showing Software Code
    • Use this layout to show software code
      • The font is Consolas, a monospace font
      • The slide doesn’t use bullets but levels can be indented using the “Increase List Level” icon on the Home menu
      • To use straight quotes &quot; instead of smart quotes ”, do this:
      • Click on the Office Button in the upper left corner
      • At the bottom of the menu, choose PowerPoint Options
      • From the left pane, select Proofing
      • Click on the AutoCorrect Options button
      • Select the AutoFormat As You Type tab, and deselect “Straight quotes” with “smart quotes”. Then Click OK.
  • 40. Table Format Table Title Column 1 Column 2 Column 3 Column 4 Column 5
  • 41. Bar Chart Example
  • 42. Pie Chart Example