Admin SharePoint 2010 with PowerShell

1,001 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,001
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Admin SharePoint 2010 with PowerShell

  1. 1. Administering SharePoint 2010with Windows PowerShell<br />Don JonesConcentrated Technology, LLChttp://concentratedtech.com<br />
  2. 2. This slide deck was used in one of our many conference presentations. We hope you enjoy it, and invite you to use it within your own organization however you like.<br />For more information on our company, including information on private classes and upcoming conference appearances, please visit our Web site, www.ConcentratedTech.com. <br />For links to newly-posted decks, follow us on Twitter:@concentrateddon or @concentratdgreg<br />This work is copyright ©Concentrated Technology, LLC<br />
  3. 3. Agenda<br />Our main goal is to explore what’s possible in SharePoint using Windows PowerShell…<br />…and to start looking at the major command sets that accomplish administrative tasks<br />We’ll spend a lot of time examining the Help files as part of this<br />
  4. 4. CAUTION: DEMOS AHEAD<br />This is a demonstration-intensive session (very few slides)<br />I will capture a shell transcript and save all of my scripts<br />You can download these (in a week or so) from ConcentratedTech.com (there’s a “Conference Materials” link in the menu)<br />
  5. 5. SP Management Shell<br />Not really an independent shell…<br />…just a “preloaded” Windows PowerShell<br />Loads a specific module/snapin at startup so that SP commands are available<br />You could also manually load these into a “normal” shell (or 3rd-party host)<br />Let’s see<br />
  6. 6. Shell Admin Permissions<br />Need to grant admins the right to use the management shell<br />Get-SPShellAdmin<br />Add-SPShellAdmin –username DOMAINuser-database (Get-SPContentDatabase-Identity database_name)<br />Remove-SPShellAdmin<br />
  7. 7. Cmdlet Naming<br />Notice the SP prefix on the noun of all SharePoint cmdlets?<br />Get-Command –noun SP* <br />Or…<br />Get-Command limited to the SharePoint module/snapin (let’s see)<br />
  8. 8. START THINKING…<br />What SP admin tasks would YOU want to automate within the shell?<br />Your ideas will drive our discovery of commands and capabilities… so start coming up with ideas!<br />
  9. 9. Starting Commands<br />Get-SPSite (get site collections)<br />Get-SPWeb (get Webs)<br />Try this:Get-SPSite –limit All |Get-SPWeb –limit All |Where { -not $_.RequestAccessEnabled }<br />
  10. 10. Limits<br />Most Get-SP* commands limit to 20 objects<br />Use –Limit to change that; either numeric or “All.”<br />Be aware of potential performance issues with large result sets – avoid doing so on production servers unless necessary<br />
  11. 11. Filters<br />Most Get-SP* commands also include a –filter parameter<br />Limits the results to just those that meet the filter criteria<br />Best way to filter – as opposed to using Where – if the property you want to filter on is supported<br />
  12. 12. Supported Filters<br />Get-SPSite<br />Owner<br />Secondary Onwer<br />LockState<br />Get-SPWeb<br />Title<br />Template<br />Get-SPWeb –filter {$_.Template –eq ’Blog’ }<br />
  13. 13. Farms<br />Get-SPFarm<br />Get-SPFarmConfig<br />Backup-SPFarm<br />Restore-SPFarm<br />
  14. 14. Servers<br />Get-SPServer [[-Identity] name]<br />Get-SPServer | Where { $_.Role –eq "Application" }<br />
  15. 15. Web Applications<br />New-SPWebApplication<br />Get-SPWebApplication<br />Remove-SPWebApplication<br />
  16. 16. Sites<br />New-SPSite<br />Get-SPSite<br />Get-SPSiteAdministration<br />Backup-SPSite<br />Remove-SPSite<br />
  17. 17. Webs<br />New-SPWeb<br />Get-SPWeb<br />Remove-SPWeb<br />
  18. 18. NOW… let’s do some Q&A<br />I’ve got more demos to show you, but want to make sure I address your questions<br />Ask ‘em now!<br />The remainder of the session will be additional demos<br />Remember: Transcript will be downloadable; no need to copy down the syntax<br />Ask for a “reminder card” if you want to download this stuff next week.<br />
  19. 19. Final Notes…<br />Please be sure to submit a session evaluation form!<br />Download slides & materials from www.ConcentratedTech.com within one week!<br />Blog, URLs, and other information is also available at www.ConcentratedTech.com for your reference<br />More resources at www.ShellHub.com<br />Thank you very much!<br />
  20. 20. Your Feedback is Important<br />Please fill out a session evaluation form.<br />Thank you!<br />
  21. 21. This slide deck was used in one of our many conference presentations. We hope you enjoy it, and invite you to use it within your own organization however you like.<br />For more information on our company, including information on private classes and upcoming conference appearances, please visit our Web site, www.ConcentratedTech.com. <br />For links to newly-posted decks, follow us on Twitter:@concentrateddon or @concentratdgreg<br />This work is copyright ©Concentrated Technology, LLC<br />

×