+ All Categories
Home > Documents > Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Date post: 18-Jan-2016
Category:
Upload: nora-griffin
View: 222 times
Download: 0 times
Share this document with a friend
18
HITP09 Administration of SharePoint 2010 using Windows PowerShell, the New Coolness Todd Klindt and Shane Young SharePoint911
Transcript
Page 1: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

HITP09 Administration of SharePoint 2010 using Windows PowerShell, the New Coolness

Todd Klindt and Shane YoungSharePoint911

Page 2: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Who is this Todd guy?WSS MVP since 2006Speaker, writer, consultant, Blackjack expertPersonal Blogwww.toddklindt.com/blogCompany web [email protected] me! @toddklindt

Page 3: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Shane Young

Owner of SharePoint911.comMicrosoft Office SharePoint Server MVPConsultant, Trainer, Writer, & Speaker • [email protected]• Blog• http://msmvps.com/shane

• SharePoint Consulting• http://www.sharepoint911.com

• http://twitter.com/shanescows

Always hits on soft 16

Who Am I?

Page 4: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Agenda• Remoting• General PowerShell tricks for the

SharePoint admin• Avoiding the Farm Configuration

Wizard• PowerShell techniques for everyday

SharePoint admins

Page 5: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

General PowerShell tips

• It’s just a shell, spruce it up some• Color• Size• Run as Admin

• Enable quick edit• Use the included ISE• Use a third party solution

Page 6: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Remoting• Must be enabled on each server• Nothing much to do on the client• Two ways in• Enter-PSSession• Invoke-Command

• Use Enable-PSRemoting to enable• Get-Help about_remoting• Watch out for security settings• Increase MaxMemoryPerShellMB

Page 7: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Avoiding the Farm Config Wizard• The Farm Config Wizard does some very bad things• Wise SharePoint admins avoid it• Use PowerShell to replicate its functionality• Steps• Managed accounts• Web applications• MySite host• Service application pool (and an IISRESET)• State Service• Usage Service• Search• User Profile Service• The rest

Page 8: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Everyday tasks - Overview• Add-SPShellAdmin• Move-SPSite• Enable Developer Dashboard• Visual Upgrade• Troubleshooting• Master pages• Get database sizes

Page 9: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Add-SPShellAdmin• Necessary for unprivileged accounts, since

you’re not logging in as the Farm account, right? RIGHT??

• Must specify databases to give access to• Gives permissions to an account• WSS_Admin_WPG on SharePoint servers• SharePoint_Shell_Access role on database

• To run it account must have:• Security_Admin role SQL instance • db_owner role on database• Local admin on SharePoint server

Page 10: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Move-SPSite• Used to move Site Collections between

content databases• Everything ‘mergecontentdbs’ can do,

this can do better• Mostly done on the SQL side• Databases must be attached to the

same web application, be on the same SQL instance, and have the same favorite color

• Works great to get rid of Content databases with GUIDs

Page 11: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Developer Dashboard• Can be enabled with STSADM, but

that’s just embarrassing• More flexibility with PowerShell

$dash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;

$dash.DisplayLevel = 'OnDemand';

$dash.TraceEnabled = $true;

$dash.Update()

Page 12: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Visual Upgrade• Can be used to rapidly check or change

status$db = Get-SPContentDatabase WSS_Content_SharePoint_2007 $db.Sites | Get-SPWeb -limit all | ForEach-Object {$_.UIversion = 4; $_.UIVersionConfigurationEnabled = $false; $_.update()}

• Or$db = Get-SPContentDatabase WSS_Content_SharePoint_2007 $db.Sites | foreach-object {$_.VisualUpgradeWebs}

Page 13: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Troubleshooting• Use New-SPLogFile immediately before

and right after recreating a problem• Use Merge-SPLogFiles to collect trace

logs from all servers in your farm• Use Get-SPLogEvent to get events• Can filter by a number of properties,

like Correlation ID• Can point at alternate directory

Get-SPLogEvent -StartTime (Get-Date).addminutes(-10) –Directory e:\logs | Where-Object {$_.correlation -eq "dc07834b-9982-4eaf-aacf-d62a6b398f87"}

Page 14: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Master Pages• Can be used to set the master page$web = Get-SPWeb http://sharepoint $web.CustomMasterUrl = "/_catalogs/masterpage/nightandday.master" $web.MasterUrl = "/_catalogs/masterpage/nightandday.master" $web.Update()

Page 15: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Database Information• Use Get-SPDatabase to get list of

databases and their properties

Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}}

Get-SPDatabase | ForEach-Object {$db=0} {$db +=$_.disksizerequired; $_.name + " - " + $_.disksizerequired/1024/1024} {Write-Host "`nTotal Storage (in MB) =" ("{0:n0}" -f ($db/1024/1024))}

Page 16: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

A short list of people that are smarter than us

• Zach Rosenfield’s blog• http://sharepoint.microsoft.com/Blogs/zach

• SPModule• http://

www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=c57556ff-8df0-44fd-aba6-3df01b9f80ce

• Gary Lapointe’s blog• http://stsadm.blogspot.com/

• Document your farm with PowerShell• http://technet.microsoft.com/en-us/library/ff645391.aspx

• PS Scripts• http://get-spscripts.com/

Page 17: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Things we referenced

• Determine database sizes in PowerShell• http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=193

• Using PowerShell to control Visual Upgrade• http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=173

• Remoting requirements for SharePoint 2010• http://

sharepoint.microsoft.com/blogs/zach/Lists/Posts/Post.aspx?ID=45• Developer Dashboard

• http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=189• Master Pages

• http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=226• Good farm configuration script from another Todd

• http://todd-carter.com/post/2010/04/26/The-Wizard-Likes-His-GUIDs.aspx

• Use Move-SPSite• http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=233

Page 18: Todd Klindt and Shane Young SharePoint911. Who is this Todd guy?

Thanks

Please fill out your evaluations

And tip your wait staff


Recommended