getting everything you want out of sharepoint

33
SharePoint User Group - Cambridge, UK 1 Getting Everything You Ever Wanted Out of SharePoint (via PowerShell) 5/15/22 Presenter: Corey Burke

Upload: corey-burke

Post on 28-Jan-2015

120 views

Category:

Technology


1 download

DESCRIPTION

SharePoint Presentation regarding usage of PowerShell and API techniques to work with data, configuration objects and troubleshooting methods in SharePoint.

TRANSCRIPT

Page 1: Getting Everything You want Out of SharePoint

SharePoint User Group - Cambridge, UK

1

Getting Everything You Ever Wanted Out of SharePoint (via PowerShell)

April 10, 2023

Presenter: Corey Burke

Page 2: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

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

• 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: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

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: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

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

4

Page 5: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Evolution of SharePoint Administration

5

CMDLets.NET APISTSADM

Pre-SharePoint

Era

SharePoint Era

2001/2003 2007 2010/2013

Page 6: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

STSADM

Page 7: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

.NET

Page 8: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

CMDLet

Page 9: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

The Who, What, Why’s of the API’s

• What is it?– Application Programming Interface

• Who needs it?– Developers

– SysAdmins

– DevOps

• Why should I care?– Direct .NET access from compatible languages

• Which includes PowerShell

– Ultimate Flexibility

9

Page 10: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Ewww! I’m not touching that!

“I’m an Infrastructure person. I never touch the APIs…”

10

Page 11: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

What Do YOU Want?

11

Data Output (File System, Text, CSV, XML, etc…)

Documents

List ID

Farm Build Version

Page 12: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Choosing an Entry Point• SPFarm• Farm ConfigurationFarm• SPServer• Server Properties, Server Roles (Web Front End, App, Database)Servers• SPWebApplication• Web Application Properties, ContentWeb Applications• SPContentDatabase• Content Databases & PropertiesDatabases• SPSite• Site Collection Properties, RootWeb, Collection of WebsSite Collections• SPWeb• Web Properties, Team Sites, Publishing Portals, etc.Webs• Document Libraries, Discussions, Surveys, etc.Lists• Documents, Images, Contacts, Pages, etc.Items

12

Page 13: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Getting Your Hands Dirty

•Data Hunting Tools– Get-Help

– Get-Member

•Examples:– Properties vs. Methods

13

Page 14: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

What do I do with my data?

14

Page 15: Getting Everything You want Out of SharePoint

15RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Migrating Content Databases

Page 16: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Migrating Content

•Scenario–You are an Administrator tasked with rapidly migrating

50+ content databases:• Development Farm to Test Farm

• 2007 to 2010

• 2010 to 2013

16

Page 17: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

What the…?

17

Page 18: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Gathering Data

•What information do we need to replicate the configuration?– Web Application URL

– Content Database name

– Status (Started or Stopped)

– A means of storing the configuration information (CSV, Text, XML, etc.)

18

Page 19: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Getting the data

19

Page 20: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

CSV Output

20

Page 21: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Putting It All Back In

21

Page 22: Getting Everything You want Out of SharePoint

22RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Broken Content

Page 23: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

WSS Profile Pictures Won’t Sync

•Scenario– 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

23

Page 24: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Where to begin?

•We need to fix all user profiles in the Site Collection– Where are the WSS profiles in the Site Collection?

• “_layouts/15/people.aspx?MembershipGroupId=0”

•How do I find the Picture Field for each user?

24

Page 25: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Ugh…

25

Page 26: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Scrubbing Profile Pictures

26

Page 27: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Results

• 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

27

Page 28: Getting Everything You want Out of SharePoint

28RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Backup Content to File System

Page 29: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Backup Content to File System

•If it is in SharePoint it can be taken out of SharePoint

•Scenario–“I need a backup of just the documents in a Site

Collection so I can start over.”

29

Page 30: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Writing Binary Data

30

Page 31: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Saving Files to the File System

31

Page 32: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | WWW.RACKSPACE.COM

Results

32

Page 33: Getting Everything You want Out of SharePoint

RACKSPACE® HOSTING | 5000 WALZEM ROAD | SAN ANTONIO, TX 78218

US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM

RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM

RACKSPACE® HOSTING | 5000 WALZEM ROAD | SAN ANTONIO, TX 78218

US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM

RACKSPACE® HOSTING | © RACKSPACE US, INC. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM