Nick Hadlee's Blog on SharePoint and Other Occasional Rants…


PowerShell and SharePoint Scripts from Tech.Ed NZ and Code Camp 2011
August 31, 2011, 9:59 pm
Filed under: 2010, Administration, PowerShell, Presentations

I recently did a PowerShell and SharePoint session at Tech Ed NZ 2011 and then again during Code Camp in the following weekend. The focus was on using PowerShell to create and configure a SharePoint portal and as promised here is a list of the scripts I used during my demo.  These scripts and a couple other useful files are in my SkyDrive so you can go and grab them individually. The whole lot is in the same place as a zip too.

This is the order that I showed and used them (or intended to):

  1. Add a managed account
  2. Add and configure a web application
  3. Add the managed metadata service application (Didn’t run this one just showed it)
  4. Adding site collections
  5. Configuring and adding content databases
  6. Backup and restore the farm, a service application and/or a web application (Didn’t run this one just showed it)
  7. Backup and restore a site collection
  8. Start a search crawl
  9. Add some sub sites
  10. Change the site collection properties to point to a search center
  11. Change the site properties to use alternate CSS and a site logo
  12. Adding users to the sites and adding a second site collection administrator
  13. Walkthrough of the web hierarchy (webs, lists, list templates, content types, fields)
  14. Basic deploy of solutions (WSP’s)
  15. A better way to deploy solutions
  16. Turning on the developer dashboard
  17. Checking the ULS

Note: These scripts were kept pretty simple to make them easy to read and describe during the demo. I’d strongly recommend you add a bit of error checking, maybe a few if/check statements etc before just running them willy nilly. Also some things were commented out during the sessions – uncomment them at your leisure.

Code Camp Slide Deck

The Code Camp slide deck is more or less the same as the Tech.Ed one.

Advertisements



%d bloggers like this: