0

使用 Power-shell 命令在 SharePoint 2016 Server 中创建“Microsoft SharePoint Foundation 订阅服务”,但它停留在下一行并且没有响应。

 $ServiceApplication = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $AppPoolName –Name $ServiceAppName –DatabaseName $DatabaseName –DatabaseServer $DatabaseServer

当我们在 Central Admin > Manager Services 中检查服务状态时,其显示状态为"Starting"

当状态显示为“正在启动”时,我们可以看到数据库已经在数据库服务器中创建。我们正在使用 SharePoint 2016 并希望为 SharePoint 创建应用程序。下一步是配置应用管理服务应用程序。不确定应用管理和订阅服务是否相互依赖。

在此处输入图像描述

4

1 回答 1

0

您可以尝试删除现有的服务应用程序并使用下面的 Powershell 脚本创建吗

在此请在变量中提供 $accountName 并与我分享结果

电源外壳

============================

$serviceTypeName = "Microsoft SharePoint Foundation Subscription Settings Service"
$accountName = "Account Name in the Format domain\user"
$appPool = "subs_pool"
$serviceName = "Subscription Settings Service"
$serviceDB = "Subscription_Settings_Service"

$service = Get-SPServiceInstance | where { $_.TypeName -eq $serviceTypeName }
Start-SPServiceInstance $service

Write-Host "Service instance started."

# Gets the name of the managed account and sets it to the variable $account for later use.
$account = Get-SPManagedAccount $accountName

$appPoolSubSvc = Get-SPServiceApplicationPool $appPool

if ($appPoolSubSvc -eq $null)
{
    # Creates an application pool for the Subscription Settings service application.
    # Uses a managed account as the security account for the application pool.
    # Stores the application pool as a variable for later use.
    $appPoolSubSvc = New-SPServiceApplicationPool -Name $appPool -Account $account
}

Write-Host "Have the application pool..."

# Creates the Subscription Settings service application, using the variable to associate it with the application pool that was created earlier.
# Stores the new service application as a variable for later use.
$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name $serviceName –DatabaseName $serviceDB

Write-Host "Service application created..."

# Creates a proxy for the Subscription Settings service application.
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc

Write-Host "Service application proxy created..."

Write-Host -ForegroundColor green "Done."
于 2020-02-13T12:36:45.183 回答