PowerShell Conference Gayathri Narayanan
-
Upload
gayathri-narayanan -
Category
Documents
-
view
50 -
download
0
description
Transcript of PowerShell Conference Gayathri Narayanan
Singapore, 2015
Platinum Sponsors
Singapore, 2015
PowerShell in SharePoint 2013 - a Powerful Management Tool
Gayathri Narayanan, Lead Consultant, NCS Pte Ltd
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
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
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
Singapore, 2015Singapore, 2015
Creating Search Service Application• Out of the box Vs PowerShell
Out of the Box PowerShellA Clean Database Name No YesIndex Location No YesModify Topology No YesMultiple Server SSA No Yes
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
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
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"
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
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
Singapore, 2015
Don’t Forget!• Fill in your survey – it’s how we do better!• Don’t lose your badge! You need it for the Social Events• Grab the Speakers for a chat – they all have time for you!• Let everyone know what they are missing on Social Media
#PowerShell#PSConfAsia
Tweets (preferably with Pictures) win Prizes!!!!