-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathCreate-AppManagementHost.ps1
23 lines (16 loc) · 1.13 KB
/
Create-AppManagementHost.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue;
Get-SPServiceInstance | Where { $_.TypeName -like "*Subscription Settings*" -or $_.TypeName -like "*App Management*" } | Start-SPServiceInstance;
$appPool = Get-SPServiceApplicationPool -Identity "SharePoint 2013 - Web Services";
$subscriptionSettingsApp = New-SPSubscriptionSettingsServiceApplication `
-ApplicationPool $appPool -Name "Subscription Settings"
-DatabaseServer "sql2012primary.geektrainer.com\SharePoint"
-DatabaseName "SharePoint_SubscriptionServices";
$subscriptionSettingsAppProxy = New-SPSubscriptionSettingsServiceApplicationProxy`
-ServiceApplication $subscriptionSettingsApp;
$appManagementApp = New-SPAppManagementServiceApplication -ApplicationPool $appPool `
-Name "App Management" -DatabaseServer "sql2012primary.geektrainer.com\sharepoint" `
-DatabaseName "SharePoint_AppManagement";
$appManagementAppProxy = New-SPAppManagementServiceApplicationProxy -Name "App Management" `
-ServiceApplication $appManagementApp;
Set-SPAppDomain "apps.sharepoint2013.com";
Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false;