Administration of SharePoint 2010 through PowerShell Information Technology
 

Administration of SharePoint 2010 through PowerShell Information Technology

on

  • 1,967 views

Suzanne George presented this at SharePoint Saturday in Austin, 2012

Suzanne George presented this at SharePoint Saturday in Austin, 2012

Statistics

Views

Total Views
1,967
Views on SlideShare
1,967
Embed Views
0

Actions

Likes
0
Downloads
10
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Administration of SharePoint 2010 through PowerShell Information Technology Administration of SharePoint 2010 through PowerShell Information Technology Presentation Transcript

  • ADMINISTRATION OF SHAREPOINT 2010 THROUGH POWERSHELLINFORMATION TECHNOLOGY - 300 Suzanne George Perficient
  • Thank you for being a part of the first SharePoint Saturday Austin• Please turn off all electronic devices or set them to vibrate.• If you must take a phone call, please do so in the hall so as not to disturb others.• Open wireless access is available with no password• Feel free to “tweet and blog” during the session• Thanks to our Title Sponsors:
  • ABOUT PERFICIENTLeading Technology Consulting & Solutions Firm Project size, Breadth of Expertise• Founded in 1997• $240MM+ in annualized Revenue• Over 1,400 highly-experienced Consultants• 19 Locations across North America• 80+% of Revenue from recurring Clients• Served over 400 Clients in past 12 monthsSoftware Solutions Expertise, including: Depth of Expertise, Efficiency & Value,• Enterprise Portals & Content Management Client Importance• SOA, EAI and BPM• e-Commerce and Product Information Mgmt• Business Intelligence/ETL• Customer Relationship Management• User Experience/UCD• Significant Integration ExpertiseKey Differentiators• Focused expertise, lower cost, faster time-to-value• IT Solutions with Business Focus• National consultants overlay Local delivery model• Mature, proven Project Methodology• Global Development Centers in China & Europe• Healthcare Thought Leadership 3
  • AGENDA• Getting Started• Creating the Farm• Creating Services• Modifying Configuration• Hot Powershell Tips 4
  • GETTING STARTED• PowerGUI is your best friend http://www.powergui.org• Codeplex example powershell installation http://autospinstaller.codeplex.com/• Understand SharePoint config.xml http://technet.microsoft.com/en-us/library/cc261668.aspx• Listing of SharePoint site templates http://toddbaginski.com/blog/which-sharepoint-2010-site-template-is-right-for-me/• Slipstreaming SharePoint w/Service Packs http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=295• ULSViewer http://archive.msdn.microsoft.com/ULSViewer• ISO Reader http://www.magiciso.com/tutorials/miso-magicdisc-history.htm 5
  • INSTALLING SHAREPOINT – PREP• Create/Edit Powershell Profile> Test-path $profile> New-item –type file –force $profile> Notepad $profile> Set-ExecutionPolicy RemoteSigned-add line: Add-PsSnapin Microsoft.SharePoint.Powershell> . $profile• Install Pre-requisites – use /h parameter to get argument options> Write-Output "Installing ADONETDataServices"> Start-Process "$folderADONETDataServices_v15_CTP2_RuntimeOnly.exe" -Wait -ArgumentList " /q“> Write-Output "Installing PowerGUI"> Start-Process "$folderPowerGUI.msi" -Wait -ArgumentList " /quiet /qb /liwe $logfolder-powerguiwindo.log/norestart"• Check registry$regkey = "HKLM:SOFTWAREMicrosoftMSSQLServerClientConnectTo"$exists = Get-ItemProperty -Path $regkey -Name $databaseServerName -ErrorAction SilentlyContinue$regkey = "HKLM:SystemCurrentControlSetControlLsa"$name = "DisableLoopbackCheck"$exists = Get-ItemProperty -Path "$regkey" -Name "$name" -ErrorAction SilentlyContinue 6
  • INSTALLING SHAREPOINT• Install SharePoint – Config.Xml - http://technet.microsoft.com/en-us/library/cc261668.aspx, http://blogs.msdn.com/b/ekraus/archive/2009/11/20/automated-sharepoint-2010- install-with-powershell.aspx$config = "sharepointInstall_config.xml"$bits = "e:"clsWrite-Progress -Activity "Installing SharePoint Quietly" -Status "Copying config file locally"Copy-Item $config -Destination $bitsWrite-Progress -Activity "Installing SharePoint Quietly" -Status "Installing SharePoint"cmd.exe /C "$bitssetup.exe /config $config"PS C:sharepointScript> .Install-SharePoint.ps1• Create New Central AdministrationNew-SPConfigurationDatabase –DatabaseName $databaseFarmDB –DatabaseServer $databaseServerName ` –AdministrationContentDatabaseName $databaseFarmAdminDB ` –Passphrase (ConvertTo-SecureString $farmPassPhrase –AsPlaintext –Force) ` -FarmCredentials $Cred_Farmif (-not $?) { throw "Failed to create admin database." }Install-SPHelpCollection -Allif (-not $?) { throw "Script error." } 7
  • INSTALLING SHAREPOINT• Create New Central AdministrationNew-SPConfigurationDatabase –DatabaseName $databaseFarmDB –DatabaseServer $databaseServerName ` –AdministrationContentDatabaseName $databaseFarmAdminDB ` –Passphrase (ConvertTo-SecureString $farmPassPhrase –AsPlaintext –Force) ` -FarmCredentials $Cred_Farmif (-not $?) { throw "Failed to create admin database." }Install-SPHelpCollection -AllInitialize-SPResourceSecurityInstall-SPServiceInstall-SPFeature –AllExistingFeaturesStart-Sleep -s 10#########################################################New-SPCentralAdministration -Port $CentralAdminPort -WindowsAuthProvider $WebAuthProviderInstall-SPApplicationContent• Add Managed AccountsNew-SPManagedAccount -Credential $Cred_spsearchNew-SPManagedAccount -Credential (Get-Credential) – pop up for user to type credentials 8
  • INSTALLING SHAREPOINT• Create New Web Application # Create a new Sharepoint WebApplication New-SPWebApplication -Name $WebAppName ` -Port $WebAppPort ` -HostHeader $WebAppHostHeader ` -URL $WebAppUrl ` -ApplicationPool $WebAppAppPool ` -ApplicationPoolAccount (Get-SPManagedAccount $WebAppAppPoolAccount) ` -DatabaseName $WebAppDatabaseName ` -DatabaseServer $WebAppDatabaseServer # Create a new Sharepoint Site Collection New-SPSite -URL $SiteCollectionURL ` -OwnerAlias $SiteCollectionOwner ` -Language $SiteCollectionLanguage ` -Template $SiteCollectionTemplate ` -Name $SiteCollectionName ` -SecondaryOwnerAlias $SiteCollectionSecondary 9
  • INSTALLING SHAREPOINT• Applications General Installation Guideline $app– Get-SPServiceApplicationPool $wasAppPoolName -ea SilentlyContinue = Setup proxy if($app -eq $null){ – Setup application service "Creating Application Pool" Write-Output• Setup Search} $app = New-SPServiceApplicationPool $wasAppPoolName -Account $webappadmin – http://blogs.msdn.com/b/jjameson/archive/2011/02/28/powershell-script-to-configure- Write-Output "Creating web analytics service application" $was = New-SPWebAnalyticsServiceApplication -Name $WebAnalyticsSAName ` search-in-sharepoint-server-2010.aspx -ApplicationPool $wasAppPoolName `• Setup Managed Metadata -ReportingDataRetention 20 ` -SamplingRate 100 ` – http://blogs.msdn.com/b/mcsnoiwb/archive/2010/05/26/script-a-metadata-service- -ListOfReportingDatabases $reportingDbSubscription ` -ListOfStagingDatabases $stageDbSubscription application-using-powershell.aspx Service Application" } if (-not $?) { throw "Failed to create WAS – Create new term http://pacsharepoint.com/2010/06/create-new-term-in-managed- Get-SPServiceInstance | where-object {$_.TypeName -eq $wasServiceTypeName} | Start-SPServiceInstance if (-not $?) { throw "Failed to start WAS Service Application" } metadata.html New-SPWebAnalyticsServiceApplicationProxy -Name $WebAnalyticsSaProxyName `• Setup Web Analytics -ServiceApplication $was if (-not $?) { throw "Failed to create WAS Proxy Service Application" }• Setup User Profile Service - Get-SPServiceInstance | where-object {$_.TypeName -eq $wasTypeName} | Start-SPServiceInstance It is easier to “click, click setup” if (-not $?) { throw "Failed to start WAS Proxy Service Application" }• Setup additional services Write-Output "verify service installation" $adminsearchurl = $adminurl + "/_admin/ServiceApplications.aspx" – Access, Performance Point, Excel Services, etc start iexplore $adminsearchurl• Setup additional parameters – Content types, email, etc 10
  • HOT POWERSHELL TIPS/SCRIPTS• Get all features of a certain type – Get-SPFeature | select-object DisplayName | select-string –Pattern “Perficient”• Install WSP files• Get list of all security groups in a web• Find string in CEWP data• Get Permission of all files• Get All Closed Web Parts• Check if files are ghosted• Setup a new site collection• Setup Adobe iFilter• Get crawl schedules 11
  • Thanks to our SponsorsTHANKS TO OUR OTHER SPONSORS!
  • SUMMARY• Installing SharePoint• Configuring Services• Advanced Configuration• Powershell Scripts 13
  • THANK YOU!For further information, please contact:Suzanne GeorgeSuzanne.George@perficient.comSr. ArchitectPerficient - Microsoft West RegionTwitter: spgenie 14