This is a live blogging post from the International SharePoint Conference London 2012. So don’t expect well-written proza here.
Note: live blogging PowerShell code isn’t exactly easy, so this abstract primarily contains snippets of some takeaways
Use PowerShell to achieve speed, consistency, reliability and repeatability in your farms setup. Treat it like production code that goes through iterations and apply the same application lifecycle mgmt principles as you would for other code!
The scripts should stay unchanged, only the XML config files change for each environment.
- Install-SPHelpCollection and Install-SPApplicationContent are not really needed
- Don’t put your passwords in the scripts!
- Make your scripts resilient, so you can run them again when one part fails
- During installation you’ll have to remove the SharePoint add ins and add them back in because some commands only are available after farm creation
- Always use web applications in different application pools than your service applications
- There is no way to manage or get a reference to your existing web applications application pools by default unfortunately
- To use claims, you need to have a New-SPAuthenticationProvider call (use an array when you have multiple)
- Get-SPSite offers a lot of possibilities, be sure to explore it beyond the surface!
- Use “splatting” for optional parameters: a hash table of key/value pairs to be passed into the cmdlet so you don’t have to specify every option
- You can set user policies (web application policies) with PowerShell too
- You don’t need to instantiate the web applications on all servers, just the web servers will do