Setup:Plug in ClickerConnect to SP and SQL VMsOn SP VM:Load up PowerShell ISELoad Scripts from ”C:\Users\BizSP_SP_Admin\Downloads\GettingEverythingSP”Load up CA and http://portal.contoso.comLoad up login text fileMake sure ”C:\Users\BizSP_SP_Admin\Downloads\GettingEverythingSP\Backups” is emptyOn SQL VM:Load up SQL MGMT StudioIcebreakers:I’ve been in London since January, but this is my first time in Cambridge. Beautiful city, I will have to bring my family back here for holiday.
Rackspace has been around for about 15 years now. I joined the company about 7 years ago. In the last 5 years that we have been selling and supporting SharePoint hosting, we have grown to over 1,000,000 dedicated seats. MS announced at the Worldwide Hosting Summit that we now carry 85% of the global dedicated hosting license. That’s huge given our relative newness compared to some of our SharePoint hosting competitors.Last year we expanded our Consulting Services capabilities with the acquisition of SharePoint 911. Anyone familiar with Shane Young, Todd Klindt, Laura Rogers, Jennifer Mason, Randy Drisgill, John Ross, all of these folks now work for Rackspace, giving us the largest collection of SharePoint MVPs under one roof, helping us to grow and improve our support capabilities.So that’s Rackspace, enough of the boring self glorification and onto…
Anyone here not familiar with PowerShell? Don’t worry I won’t hold it against you… I try to keep my example code as simple as possible, but when we get to the demos feel free to ask questions if anything doesn’t make sense.
Pre-SharePoint era – Marked by heavy use of file shares, printing and filing of emails, swinging from trees, you get the idea… This was not man’s greatest period of collaboratiom. No fire was discovered here…STSADM – The first tool created for Admins to manage SharePoint configuration. Crude, but occasionally effective, not flexible in the slightest. PowerShell was also being developed during this time….NET API – With the advent of SharePoint 2007 came a robust .NET API. With the success of PowerShell and native .NET API access the world began to open up.CMDLETs – With the release of SharePoint 2010, PowerShell reached maturity within the product with native PowerShell CMDLets that do most of the API access work, greatly simplifying data access and manipulation.
Results: We can only go as far as listing the solutions in the Farm in a plain text output.
Here you can see that accessing through cmdlets does not differ greatly from the .NET example.Two main differences from .NET1) How PowerShell gains access into the SP API2) How you create an objectCMDLets handle getting the objects for youCMDLets are still limiting in that there are not CMDLets for every type of object you may need to interact withDownside Example: No CMDLets exist for setting People Picker settings
What:Objects are created from a blueprint, called a class, that defines the base properties that every object created from it will contain. This clicker has properties, such as color, weight, laser intensity. The clicker also has methods for taking input, such as the on/off switch, left/right mouse click, etc.Somewhere, someone has a blueprint that defines how this clicker is to be built so that the methods always work exactly the same, but the properties, such as color, can be changed.The API defines and provides the methods by which one interacts with the objects derived from the class definitions. Such as Clicker1.LeftClick() method performs an action. Clicker1.Color = “Blue” changes a property.Why:Coder’s – To be able to write new applications or new functionality for an existing application frameworkSysAdmins – Troubleshooting, AutomationExamples: Migrating user profiles from one domain to another, Finding solutions to problems that used to require lengthy, and expensive, engagements with Microsoft
This is my reaction whenever an Admin says this out loud. A good rule of thumb, even of you HATE programming of any kind, is to never say this out loud.It shows a fundamental lack of understanding of what an API is, and the benefits that scripted automation can bring to a business and the Admin role.Often the Admins are the ONLY ones in a business capable of improving Administration processes and tools through scripting.If you manage any kind of software infrastructure, you NEED scripting languages and knowledge of how APIs work.
What is it you need out of SharePoint?Documents?ListID? Farm Build Version? Your solution packages because you lost the originals? List of activated Features?If it is stored in the configuration database, content, service applications, etc, it will be available through PowerShell, even if it is not available through Central Administration or the SharePoint Site.This is the easy part, unless you are troubleshooting in which case this may in fact be the hardest part. For our current position in this presentation we will assume this is the easy part.
My most often used format is to store data in CSV file format. CSV stands for Comma Separated Values, and is just a plain text file that contains rows of related data, much like a table in a SQL database, or worksheet in Excel, separated by commas into “columns”.
Or any combination of the above, or maybe you are building a same version Farm to migrate to because something irreparable is wrong with your live Farm.Working with 50 or more content databases can be a daunting task, especially if they are spread across multiple web applicationsYou could go buy some tool to do this, but when you are faced with getting something like this accomplished quickly you have to be able to think on your feet or you could have some sleepless nights ahead. Using PowerShell can save your company some money, impress your peers and get you home in time for dinnerWith a minimal amount of effort you can have this done in no time.
Getting Everything You want Out of SharePoint
Getting Everything You Ever Wanted Out of
SharePoint (via PowerShell)
SharePoint User Group - Cambridge, UK
Presenter: Corey Burke
December 2, 2013
Who does this guy think he is?
• Corey Burke
• Architect, trainer, speaker and founding member of the SharePoint Hosting Services team
at Rackspace: The Open Cloud Company
• Contributing author - Professional SharePoint 2013 Administration
• Technical Editor - Beginning SharePoint 2013: Building Business Solutions
• Recovering anti-socialite
• Find me on LinkedIn
• The largest collective
team of SharePoint
• Over 1,000,000
• The largest collection
• The most 'Microsoft
Hosting Partner of the
Year' awards (4)
• The most published
(23 and counting)
• The only company with
(As stated by Microsoft at the 'Worldwide Hosting Summit', May 23rd, 2013.)
The Good Stuff…
What we’ll be covering today
– Evolution of SharePoint Administration
– API: Who needs it?
– What do YOU want?
– Where to begin?
– Getting your hands dirty
– Using what you got
Evolution of SharePoint Administration
The Who, What, Why’s of the API’s
• What is it?
– Application Programming Interface
• Who needs it?
• Why should I care?
– Direct .NET access from compatible languages
• Which includes PowerShell
– Ultimate Flexibility
Ewww! I’m not touching that!
“I’m an Infrastructure person. I never touch the APIs…”
What Do YOU Want?
Data Output (File System,
Text, CSV, XML, etc…)
Choosing an Entry Point
• Farm Configuration
• Server Properties, Server Roles (Web Front End, App, Database)
• Web Application Properties, Content
• Content Databases & Properties
• Site Collection Properties, RootWeb, Collection of Webs
• Web Properties, Team Sites, Publishing Portals, etc.
• Document Libraries, Discussions, Surveys, etc.
• Documents, Images, Contacts, Pages, etc.
Getting Your Hands Dirty
• Data Hunting Tools
– Properties vs. Methods
What do I do with my data?
–You are an Administrator tasked with rapidly migrating
50+ content databases:
• Development Farm to Test Farm
• 2007 to 2010
• 2010 to 2013
• What information do we need to replicate the
– Web Application URL
– Content Database name
– Status (Started or Stopped)
– A means of storing the configuration information (CSV, Text, XML,
Getting the data
WSS Profile Pictures Won’t Sync
– Content was migrated to a new Farm
– A new URL is has been used in the new Farm
– The Sync job from the Profile Sync Service is only syncing some
pictures while others remain broken links pointing to the old URL
• You already tried stsadm –o listolddatabases and deleteolddatabases
commands with no change
Where to begin?
• We need to fix all user profiles in the Site
– Where are the WSS profiles in the Site Collection?
• How do I find the Picture Field for each user?
• Don’t forget to run
– Stsadm –o sync –deleteolddatabases 0
• Make sure your logged on user has Full Control Permissions to the User Profile Service App
– Then wait an hour, or manually run the “User Profile Service Application - User Profile to
SharePoint Full Synchronization” Timer Job from Central Admin
Backup Content to File System
Backup Content to File System
•If it is in SharePoint it can be taken out of
–“I need a backup of just the documents in a Site
Collection so I can start over.”
Writing Binary Data
Saving Files to the File System