Transcript
Page 1: Create a blueprint of your Farm using PowerShell with Corey Burke

Create a Blueprint of your SharePoint Farm using PowerShell

Corey BurkePrincipal Architect – Rackspace Hosting

Page 2: Create a blueprint of your Farm using PowerShell with Corey Burke

About Me• Architect, trainer, speaker and Manager of the SharePoint Hosting Services team at Rackspace: The

Open Cloud Company in the UK• Contributing author - Professional SharePoint 2013 Administration • Technical Editor - Beginning SharePoint 2013: Building Business Solutions• Contact Me:

• Email• [email protected]

• Blog• http://blog.sharepoint-voodoo.net

• Twitter• http://twitter.com/cburke007

• Find me on LinkedIn• http://uk.linkedin.com/in/cburke007/

Page 3: Create a blueprint of your Farm using PowerShell with Corey Burke

About Rackspace

• The largest collective team of SharePoint MVPs.

• The largest collection of published SharePoint authors.

• The most published SharePoint books. (23 and counting)

3

• Over 1,000,000 dedicated seats.

• The most 'Microsoft Hosting Partner of the Year' awards (4)

• The only company with Fanatical Support®

(As stated by Microsoft at the 'Worldwide Hosting Summit', May 23rd, 2013.)

Page 4: Create a blueprint of your Farm using PowerShell with Corey Burke

Agenda• PowerShell & XML• Creating an XML structure• Mining SharePoint for configuration data• Reading & Writing XML• Mining the output XML for data• Usage scenarios

Page 5: Create a blueprint of your Farm using PowerShell with Corey Burke

Why XML?• Natively supported by PowerShell and .NET• Lightweight/Portable• Easy to update by hand• Relational (Hierarchically)• Widely compatible

Page 6: Create a blueprint of your Farm using PowerShell with Corey Burke

• Loading SharePoint Assemblies• 2007

• 2010/2013

Priming PowerShell for .NET

Page 7: Create a blueprint of your Farm using PowerShell with Corey Burke

• 2007

• 2010/2013

Instantiating Objects

Page 8: Create a blueprint of your Farm using PowerShell with Corey Burke

• Two most important CMDLets in PowerShell– Get-Help– Get-Member

Going Deeper into PS Objects

Page 9: Create a blueprint of your Farm using PowerShell with Corey Burke

• Create the XML variable• Query your desired data• Select the XML Node where you want to insert data• Create a new Element and set any desired attributes• Append the new Element to the selected Node in the

XML Variable

Writing XML

Page 10: Create a blueprint of your Farm using PowerShell with Corey Burke

Creating the XML object

Page 11: Create a blueprint of your Farm using PowerShell with Corey Burke

Get the local Farm object

Page 12: Create a blueprint of your Farm using PowerShell with Corey Burke

Saving the XML to a file

Page 13: Create a blueprint of your Farm using PowerShell with Corey Burke

Reading XML from a File

Page 14: Create a blueprint of your Farm using PowerShell with Corey Burke

Get Web App Data

Page 15: Create a blueprint of your Farm using PowerShell with Corey Burke

Finding Data in XML

Page 16: Create a blueprint of your Farm using PowerShell with Corey Burke

Searching XML with XPath

Page 17: Create a blueprint of your Farm using PowerShell with Corey Burke

Get Alternate Access Mappings

Page 18: Create a blueprint of your Farm using PowerShell with Corey Burke

Get Content Database Data

Page 19: Create a blueprint of your Farm using PowerShell with Corey Burke

Get Service App Data

Page 20: Create a blueprint of your Farm using PowerShell with Corey Burke

Display Web App Config Data

Page 21: Create a blueprint of your Farm using PowerShell with Corey Burke

Display Databases for Web App

Page 22: Create a blueprint of your Farm using PowerShell with Corey Burke

Putting it all togetherhttp://spaudit.codeplex.com

Page 23: Create a blueprint of your Farm using PowerShell with Corey Burke

• Incorporate the XML output into an automated install script (AutoSPInstaller?)

• Use the XML as a data source in SharePoint• File it away for rebuilds or migrations

Where can you go from here?

Page 24: Create a blueprint of your Farm using PowerShell with Corey Burke

• We covered– Gathering useful information from SharePoint– Storing that information in XML– Retrieving Information from XML– Using the output XML in an example scenario

Summary


Recommended