Creates the App Service For SharePoint 2016
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
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) | |
{ | |
#Add SharePoint PowerShell Commands | |
Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
} | |
$DatabaseServerName = "SQL2016" | |
$AppPoolName = "Default SharePoint Service App Pool" | |
$AppPoolUserName = "CFCODE2016\SP_Services" | |
$AppDomain = "cfapps.com" | |
$SubSettingsName = “Subscription Settings Service” | |
$SubSettingsDB = “SP_SubscriptionSettingsDB” | |
$AppManagementName = “App Management Service” | |
$AppManagementNameProxy = "App Management Service Proxy" | |
$AppManagementDB = “SP_AppManagementDB” | |
$SubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $AppPoolName –Name $SubSettingsName –DatabaseName $SubSettingsDB | |
$SubSvcProxy = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $SubSvc | |
Get-SPServiceInstance | where-object {$_.TypeName -eq $SubSettingsName} | Start-SPServiceInstance > $null | |
$AppManagement = New-SPAppManagementServiceApplication -Name $AppManagementName -DatabaseServer $DatabaseServerName -DatabaseName $AppManagementDB –ApplicationPool $AppPoolName | |
$AppManagementProxy = New-SPAppManagementServiceApplicationProxy -ServiceApplication $AppManagement -Name $AppManagementNameProxy | |
Get-SPServiceInstance | where-object {$_.TypeName -eq $AppManagementName} | Start-SPServiceInstance > $null | |
Set-SPAppDomain $AppDomain | |
Set-SPAppSiteSubscriptionName -Name “apps” -Confirm:$false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment