Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 19, 2016
0 parents
commit b145e4c
Showing
11 changed files
with
401 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2016 Stacy Simpkins | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Apress Source Code | ||
|
||
This repository accompanies [*Building a SharePoint 2016 Home Lab*](http://www.apress.com/9781484221693) by Stacy Simpkins (Apress, 2016). | ||
|
||
![Cover image](9781484221693.jpg) | ||
|
||
Download the files as a zip using the green button, or clone the repository to your machine using Git. | ||
|
||
##Releases | ||
|
||
Release v1.0 corresponds to the code in the published book, without corrections or updates. | ||
|
||
##Contributions | ||
|
||
See the file Contributing.md for more information on how you can contribute to this repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributing to Apress Source Code | ||
|
||
Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. | ||
|
||
## How to Contribute | ||
|
||
1. Make sure you have a GitHub account. | ||
2. Fork the repository for the relevant book. | ||
3. Create a new branch on which to make your change, e.g. | ||
`git checkout -b my_code_contribution` | ||
4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. | ||
5. Submit a pull request. | ||
|
||
Thank you for your contribution! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Set-ExecutionPolicy Unrestricted | ||
|
||
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue | ||
Remove-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue | ||
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue | ||
|
||
Write-Host "When prompted for credentials, give SharePoint the farm account, not the install account that you are signed in with, then provide the passphrase, note: you will not be prompted for passPhrase if it is baked into the script" -ForegroundColor green | ||
|
||
New-SPConfigurationDatabase -DatabaseName PRD_SharePoint_ConfigDB -DatabaseServer SPAlias -Passphrase (ConvertTo-SecureString "1Qaz2Wsx3Edc4Rfv" -AsPlainText -Force) -FarmCredentials (Get-Credential) -AdministrationContentDatabaseName PRD_SharePoint_CentralAdmin_Content -SkipRegisterAsDistributedCacheHost -localserverrole Application | ||
|
||
#Enter the port for Central Admin and the Authentication Provider if different than NTLM# | ||
|
||
$CAPort = 11111 | ||
$CAAuth = “NTLM” | ||
|
||
|
||
#Must use this order http://technet.microsoft.com/en-us/library/ff806336(v=office.14).aspx## | ||
|
||
|
||
Install-SPHelpCollection -All | ||
Initialize-SPResourceSecurity | ||
Install-SPService | ||
Install-SPFeature -AllExistingFeatures | ||
|
||
New-SPCentralAdministration -Port $CAPort -WindowsAuthProvider $CAAuth | ||
|
||
Install-SPApplicationContent | ||
|
||
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name “DisableLoopbackCheck” -value “1” -PropertyType dword | ||
|
||
$ServiceConnectionPoint = get-SPTopologyServiceApplication | select URI | ||
|
||
Set-SPFarmConfig -ServiceConnectionPointBindingInformation $ServiceConnectionPoint -Confirm: $False | ||
|
||
Write-Host "Make sure to register the managed accounts for Service Apps and for Web Content before continuing with the 2013Install script" -ForegroundColor Blue -BackgroundColor white | ||
Write-Host "#######################################################################################################################################" -ForegroundColor Blue -BackgroundColor White | ||
Write-Host "Have a great SharePoint Day. . ." -ForegroundColor Green | ||
Write-Host "#######################################################################################################################################" -ForegroundColor Green | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
<# Check line 8, line 12, line 16, and line 55 and check all databasename, log path, and account variables correspond with your naming convention | ||
Based on scripts at http://www.harbar.net/articles/sp2013mt.aspx and http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=378 | ||
Thanks Todd and Spencer! | ||
This should be run on the first server in your farm #> | ||
|
||
#Creates the Default Service Application Pool# | ||
|
||
New-SPServiceApplicationPool -Name “Default SharePoint Service App Pool” -Account “Tailspintoys\svc_svcacct” | ||
|
||
## Replace values between < > with correct values and remove < ># | ||
|
||
$DatabaseServerName = “SPAlias“ | ||
|
||
$AppPoolName = “Default SharePoint Service App Pool” | ||
|
||
$AppPoolUserName = “Tailspintoys\svc_svcacct“ | ||
|
||
$SAAppPool = Get-SPServiceApplicationPool -Identity $AppPoolName -EA 0 | ||
|
||
if($SAAppPool -eq $null) | ||
|
||
{ | ||
|
||
$AppPoolAccount = Get-SPManagedAccount -Identity $AppPoolUserName -EA 0 | ||
|
||
if($AppPoolAccount -eq $null) | ||
|
||
{ | ||
|
||
$AppPoolCred = Get-Credential $AppPoolUserName | ||
|
||
$AppPoolAccount = New-SPManagedAccount -Credential $AppPoolCred -EA 0 | ||
|
||
} | ||
|
||
$AppPoolAccount = Get-SPManagedAccount -Identity $AppPoolUserName -EA 0 | ||
|
||
if($AppPoolAccount -eq $null) | ||
|
||
{ | ||
|
||
Write-Host “Cannot create or find the managed account $appPoolUserName, please ensure the account exists.” | ||
|
||
Exit -1 | ||
|
||
} | ||
|
||
New-SPServiceApplicationPool -Name $SAAppPoolName -Account $AppPoolAccount -EA 0 > $null | ||
|
||
} | ||
|
||
##Configure Farm Service Applications | ||
|
||
## Create Usage and Health Data Collection Service and State Service Applications, replace variables with desired values for database names, etc. ## | ||
|
||
## Begin Variables for usage and health data collection and state service, make sure the E: location exists first ## | ||
$usageSAName = “Usage and Health Data Collection Service” | ||
$usageServiceDBName = “PRD_Usage_HealthDataDB” | ||
$usageLogLocationOnDisk = “E:\logs\ULS\” | ||
$stateSAName = “State Service” | ||
$stateServiceDatabaseName = “PRD_StateServiceDataDB” | ||
## End Variables ## | ||
|
||
Set-SPUsageService -LoggingEnabled 1 -UsageLogLocation $usageLogLocationOnDisk -UsageLogMaxSpaceGB 2 | ||
|
||
$serviceInstance = Get-SPUsageService | ||
|
||
New-SPUsageApplication -Name $usageSAName -DatabaseServer $DatabaseServerName -DatabaseName $usageServiceDBName -UsageService $serviceInstance > $null | ||
|
||
$stateServiceDatabase = New-SPStateServiceDatabase -Name $stateServiceDatabaseName | ||
|
||
$stateSA = New-SPStateServiceApplication -Name $stateSAName -Database $stateServiceDatabase | ||
|
||
New-SPStateServiceApplicationProxy -ServiceApplication $stateSA -Name “$stateSAName Proxy” -DefaultProxyGroup | ||
|
||
## Create Managed Metadata Service (If Upgrading Use Existing Database Name of database that was attached) ## | ||
|
||
$metadataSAName = “Managed Metadata Service” | ||
$metadataDBName = “PRD_ManagedMetadataDB” | ||
|
||
$mmsApp = New-SPMetadataServiceApplication -Name $metadataSAName –ApplicationPool $AppPoolName -DatabaseServer $DatabaseServerName -DatabaseName $metadataDBName > $null | ||
|
||
New-SPMetadataServiceApplicationProxy -Name “$metadataSAName Proxy” -DefaultProxyGroup -ServiceApplication $metadataSAName > $null | ||
|
||
Get-SPServiceInstance | where-object {$_.TypeName -eq “Managed Metadata Web Service”} | Start-SPServiceInstance > $null | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Word ## | ||
|
||
$wordAutomationServiceName = “Word Automation Service Application” | ||
$wordAutomationDatabaseName = “PRD_WordAutomationDataDB“ | ||
|
||
Get-SPServiceApplicationPool –Identity $AppPoolName | New-SPWordConversionServiceApplication -Name $wordAutomationServiceName -DatabaseName $wordAutomationDatabaseName | ||
|
||
## BDC (If Upgrading Use Existing Database Name) ## | ||
|
||
$BDCServiceName = “Business Data Connection Service Application” | ||
$BDCDatabaseName = “PRD_BusinessDataConnectionDataDB“ | ||
|
||
New-SPBusinessDataCatalogServiceApplication –ApplicationPool “Default SharePoint Service App Pool” –DatabaseName $BDCDatabaseName –DatabaseServer $DatabaseServerName –Name $BDCServiceName | ||
|
||
### New-SPBusinessDataCatalogServiceApplicationProxy -Name “Business Data Connection Service Application Proxy” -ServiceApplication “Business Data Connection Service Application”## | ||
|
||
## Secure Store (If Upgrading Use Existing Database Name) ## | ||
|
||
#See page 162 - - previously did not have variable instantiation of the service app, and was trying to call the app by name on the proxy line versus the variable### | ||
|
||
$SecureStoreServiceAppName = “Secure Store Service Application” | ||
$SecureStoreDBName = “PRD_SecureStoreServiceDB” | ||
|
||
$SecureStoreServiceApp = New-SPSecureStoreServiceApplication –ApplicationPool $AppPoolName –AuditingEnabled:$false –DatabaseServer $DatabaseServerName –DatabaseName $SecureStoreDBName –Name $SecureStoreServiceAppName | ||
|
||
New-SPSecureStoreServiceApplicationProxy –Name “Secure Store Service Application Proxy” –ServiceApplication $SecureStoreServiceApp -DefaultProxyGroup | ||
|
||
## Performance Point (If Upgrading Use Existing Database Name) ## | ||
|
||
$PerformancePointAppProxyName = “Performance Point Service Application Proxy” | ||
$PerformancePointAppName = “Performance Point Service Application” | ||
$PerformancePointDatabase = “PRD_PerformancePointDataDB” | ||
|
||
|
||
New-SPPerformancePointServiceApplication -Name $PerformancePointAppName -ApplicationPool $AppPoolName -DatabaseName $PerformancePointDatabase | ||
|
||
New-SPPerformancePointServiceApplicationProxy -Name $PerformancePointAppProxyName -ServiceApplication $PerformancePointAppName -Default | ||
|
||
|
||
## Create Subscription Settings and App Management Services ## See minute 40 point int video dated 8/4/2014#### | ||
|
||
$SubSettingssName = “Subscription Settings Service” | ||
|
||
$SubSettingsDatabaseName = “PRD_SubscriptionSettingsDB” | ||
|
||
$AppManagementName = “App Management Service” | ||
|
||
$AppManagementDatabaseName = “PRD_AppManagementDB” | ||
|
||
$AppPoolName = “Default SharePoint Service App Pool” | ||
|
||
$DatabaseServerName = “SPAlias“ | ||
|
||
Write-Host “Creating Subscription Settings Service and Proxy…” | ||
|
||
$SubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $AppPoolName –Name $SubSettingssName –DatabaseName $SubSettingsDatabaseName | ||
|
||
$SubSvcProxy = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $SubSvc | ||
|
||
Get-SPServiceInstance | where-object {$_.TypeName -eq $SubSettingssName} | Start-SPServiceInstance > $null | ||
|
||
Write-Host “Creating App Management Service and Proxy…” | ||
|
||
$AppManagement = New-SPAppManagementServiceApplication -Name $AppManagementName -DatabaseServer $DatabaseServerName -DatabaseName $AppManagementDatabaseName –ApplicationPool $AppPoolName | ||
|
||
$AppManagementProxy = New-SPAppManagementServiceApplicationProxy -ServiceApplication $AppManagement -Name “$AppManagementName Proxy” | ||
|
||
Get-SPServiceInstance | where-object {$_.TypeName -eq $AppManagementName} | Start-SPServiceInstance > $null | ||
|
||
Set-SPAppDomain apps.Tailspintoys.com | ||
|
||
Set-SPAppSiteSubscriptionName -Name “apps” -Confirm:$false | ||
|
||
## Create Machine Translation Service ## | ||
|
||
$AppPool = “Default SharePoint Service App Pool” | ||
|
||
$MTSInst = “Machine Translation Service” | ||
|
||
$MTSName = “Translation Service” | ||
|
||
$MTSDB = “PRD_MachineTranslationDB” | ||
|
||
$AppPoolName = Get-SPServiceApplicationPool $AppPool | ||
|
||
Get-SPServiceInstance | ? {$_.GetType().Name -eq $MTSInst} | Start-SPServiceInstance | ||
|
||
$MTS = New-SPTranslationServiceApplication -Name $MTSName -ApplicationPool $AppPoolName -DatabaseName $MTSDB | ||
|
||
$MTSProxy = New-SPTranslationServiceApplicationProxy –Name “$MTSName Proxy” –ServiceApplication $MTS –DefaultProxyGroup | ||
|
||
|
||
Write-Host "Time to configure User Profile Service, Visio, Excel,Performance Point. . ." -ForegroundColor White | ||
Write-Host "##########################################################################################" -ForegroundColor White | ||
Write-Host "Configure Publishing Infrastructure. . ." -ForegroundColor White | ||
Write-Host "##########################################################################################" -ForegroundColor White | ||
Write-Host "And, Time to run the enable .Net Session State and install Workflow Manager 1.0. . ." -ForegroundColor White | ||
Write-Host "##########################################################################################" -ForegroundColor White | ||
Write-Host "Have a great SharePoint Day. . ." -ForegroundColor White | ||
Write-Host "##########################################################################################" -ForegroundColor White |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa -Name “DisableLoopbackCheck” -value “1” -PropertyType dword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Connect-SPConfigurationDatabase -DatabaseName PRD_SharePoint_ConfigDB -DatabaseServer SPAlias -Passphrase (ConvertTo-SecureString "1Qaz2Wsx3Edc4Rfv" -AsPlainText -Force) -localserverrole distributedCache | ||
Install-SPHelpCollection -All | ||
Initialize-SPResourceSecurity | ||
Install-SPService | ||
Install-SPFeature -AllExistingFeatures | ||
Install-SPApplicationContent | ||
Start-Service SPTimerV4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Connect-SPConfigurationDatabase -DatabaseName PRD_SharePoint_ConfigDB -DatabaseServer SPAlias -Passphrase (ConvertTo-SecureString "1Qaz2Wsx3Edc4Rfv" -AsPlainText -Force) -localserverrole Search | ||
Install-SPHelpCollection -All | ||
Initialize-SPResourceSecurity | ||
Install-SPService | ||
Install-SPFeature -AllExistingFeatures | ||
Install-SPApplicationContent | ||
Start-Service SPTimerV4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Connect-SPConfigurationDatabase -DatabaseName PRD_SharePoint_ConfigDB -DatabaseServer SPAlias -Passphrase (ConvertTo-SecureString "1Qaz2Wsx3Edc4Rfv" -AsPlainText -Force) -localserverrole WebFrontEnd | ||
Install-SPHelpCollection -All | ||
Initialize-SPResourceSecurity | ||
Install-SPService | ||
Install-SPFeature -AllExistingFeatures | ||
Install-SPApplicationContent | ||
Start-Service SPTimerV4 |
Oops, something went wrong.