Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PowerShell Conference Asia

183 views

Published on

This covers SSA, Content Management - ways to handle these powerfully using PowerShell

Published in: Software
  • Be the first to comment

  • Be the first to like this

PowerShell Conference Asia

  1. 1. Singapore, 2015 Platinum Sponsors Singapore, 2015 PowerShell in SharePoint 2013 - a Powerful Management Tool Gayathri Narayanan, Lead Consultant, NCS Pte Ltd
  2. 2. Singapore, 2015Singapore, 2015 Agenda • PowerShell and SharePoint 2013 • High level overview of PowerShell • Permissions and PowerShell • Understanding SharePoint Search Service Application • PowerShell’s Search Service Application (SSA) • Creating and Modifying the Search topology • Content Management • Managing content databases • Managing database site collections • Memory and Disposal
  3. 3. Singapore, 2015Singapore, 2015 PowerShell and SharePoint 2013
  4. 4. Singapore, 2015Singapore, 2015 High level overview of PowerShell • Interactive task-based command line shell for Microsoft products (Windows, SharePoint, SQL Server, etc.) • Replaces deprecated STSADM SharePoint tool • Used to automate and schedule routine system tasks • Cmdlets are simple single-function command-line commands • Name format is verb-noun separated by a dash: Get-Help • Cmdlet performs specific task – Get retrieves object data, Set changes object data, Out directs output to specific destination
  5. 5. Singapore, 2015Singapore, 2015 Permissions and PowerShell • Open PowerShell as Administrator • If using Windows PowerShell Console, must register SharePoint snap-in using Add-PSSnapin Microsoft.SharePoint.PowerShell • Account used to install SharePoint granted PowerShell Admin rights. Use Add-SPShellAdmin to grant to other users • Requires securityadmin fixed server role on SQL Server Instance • Requires db_owner fixed database role on all databases updating • Requires you be a member of the Administrators group on server running PowerShell commands
  6. 6. Singapore, 2015Singapore, 2015 Understanding SharePoint SSA
  7. 7. Singapore, 2015Singapore, 2015 SharePoint Search Architecture
  8. 8. Singapore, 2015Singapore, 2015 Creating Search Service Application • Out of the box Vs PowerShell Out of the Box PowerShell A Clean Database Name No Yes Index Location No Yes Modify Topology No Yes Multiple Server SSA No Yes
  9. 9. Singapore, 2015Singapore, 2015 PowerShell’s Search Service Application • Expedites the creation of Search service application in DR scenario • Allows you to specify components of Search service • Database Names • Application Pool • Proxy Server Name • Create script to reuse when building multiple instances of a Search service application • Must use PowerShell to modify search topology
  10. 10. Singapore, 2015Singapore, 2015 Search Topology
  11. 11. Singapore, 2015
  12. 12. Singapore, 2015
  13. 13. Singapore, 2015Singapore, 2015 Managing Content Database
  14. 14. Singapore, 2015Singapore, 2015 Content DB Cmdlets • Get-SPContentDatabase • New-SPContentDatabase -Name SharePoint_Content_DB -WebApplication “SharePoint Demo” • Set-SPContentDatabase http://SharePointDemo.com | -Set-SPContentDatabase -MaxSiteCount 1 • Dismount-SPContentDatabase • Mount-SPContentDatabase • Remove-SPContentDatabase • Test-SPContentDatabase
  15. 15. Singapore, 2015Singapore, 2015 Site Collection Cmdlets • Get-SPSite CBTN_Content_DB • Move-SPSite http://SharePointDemo.com/sites/demo - DestinationDatabase SharePoint_Content_DB • New-SPSite http://SharePointDemo.com/sites/NewMVA – ContentDatabase SharePoint_Content_DB -Template "STS#0"
  16. 16. Singapore, 2015
  17. 17. Singapore, 2015Singapore, 2015 Memory and Disposal • SPSite and SPWeb consumes resources • PowerShell, in conjunction with the SharePoint object model, assists in the disposal of expensive SharePoint objects. • Use SharePoint Management Shell, rather than the standard Windows PowerShell which is a multi-threaded. • Get-SPWebApplication | Get-SPSite –limit all | Foreach-Object { $._Url } – Windows PowerShell • Start-SPAssignment –Global $site = Get-SPSite "http://sp2013" Foreach ($web in $site.AllWebs) { Write-Host $web.Title } Stop-SPAssignment –Global
  18. 18. Singapore, 2015Singapore, 2015 Summary • PowerShell and SharePoint 2013 • High level overview of PowerShell • Permissions and PowerShell • Understanding SharePoint Search Service Application • PowerShell’s Search Service Application (SSA) • Creating and Modifying the Search topology • Content Management • Managing content databases • Managing database site collections • Memory and Disposal

×