本文档将指导您完成在 SharePoint Manager Plus 中配置本地部署的 SharePoint 农场的流程。
创建一个具有以下权限的用户账户,以配置本地部署的 SharePoint 农场服务器。
要通过 PowerShell 脚本为用户分配此角色,请在 SharePoint 服务器上打开 PowerShell 并运行以下命令:
- Add-PSSnapin Microsoft.SharePoint.PowerShell
- Get-SPDatabase | Add-SPShellAdmin DOMAIN\UserName [ Replace DOMAIN\UserName with actual User account]
或者,您可以通过打开 SQL Server Management Studio,为用户分配 DBCREATOR、SECURITYADMIN、 和 SYSADMIN 服务器角色。
同时,确保用户在所有 SharePoint 数据库中具有 DBOWNER 权限。
选项,并为用户分配具有
Add-PSSnapin Microsoft.SharePoint.PowerShell
$user = "DOMAIN\UserName"
$displayName = "User Display Name"
Get-SPWebApplication | foreach { `
$policy = $_.Policies.Add($user,$displayName) `
$role = $_.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType] ::FullControl) `
$policy.PolicyRoleBindings.Add($role) `
$_.Update() `
}
要通过 PowerShell 分配,请在 SharePoint 服务器上运行以下脚本:
确保用户账户对所有站点集合拥有管理员访问权限,以便获取站点集合的详细报告。
Enable-PSRemoting -Force
Enable-WSManCredSSP -Role Server -Force
私有 并继续。
增加每个 shell 分配的最大内存,推荐大小为 1024MB。 Get-Item wsman:\localhost\shell\MaxMemoryPerShellMB
(检查当前 PowerShell 内存大小) Get-Item wsman:\localhost\shell\MaxMemoryPerShellMB
Set-Item wsman:\localhost\shell\MaxMemoryPerShellMB -Value 1024 -Force
Set-Item wsman:\localhost\Plugin\Microsoft.PowerShell\Quotas\MaxMemoryPerShellMB -Value 1024 -Force Restart-Service WinRM
增加每个用户允许的最大并发 shell 数,推荐值为 30。 Get-Item wsman:\localhost\shell\MaxShellsPerUser
Set-Item wsman:\localhost\shell\MaxMemoryPerShellMB -Value 1024 -Force
Set-Item wsman:\localhost\shell\MaxShellsPerUser -Value 30 -Force
(仅当当前值小于 30 时运行) 请在安装 SharePoint Manager Plus 的计算机上执行以下操作:
Enable-PSRemoting -ForceEnable-WSManCredSSP -Role Client -DelegateComputer
Set-Item wsman:\localhost\shell\MaxShellsPerUser -Value 30 -Force
"server.domain.com" (SharePoint 服务器的完全限定域名 (FQDN)) 注意:如果 SharePoint 服务器和安装 SharePoint Manager Plus 的机器处于不同域,请在安装 SharePoint Manager Plus 的机器上运行以下命令。 Set-Item WSMan:\localhost\Client\TrustedHosts -Value
Set-Item wsman:\localhost\shell\MaxMemoryPerShellMB -Value 1024 -Force
-Concatenate -Force
Test-NetConnection <sharepoint_server_name> -Port 5985
以上命令成功执行后,按照以下步骤检查从安装 SharePoint Manager Plus 的机器是否能访问 SharePoint 服务器。 在安装 SharePoint Manager Plus 的机器上,以管理员身份打开 PowerShell 并运行以下命令: Enter-PSSession -ComputerName "FQDN_of_SharePoint_Server_name" -Credential "DOMAIN\farm_admin_username" -Authentication CredSSP (按
Enter
键,并在弹出提示中输入密码)
Add-PSSnapin Microsoft.SharePoint.PowerShell
Get-SPFarm 上述命令应显示即将连接的 SharePoint 农场名称。如果显示,则说明连接成功。现在可继续使用 SharePoint Manager Plus 连接 SharePoint 农场。.
故障排除步骤 。 第5步:添加本地部署的农场服务器
Enable-PSRemoting -Force如果您的 SharePoint 服务器使用安全的 HTTPS 连接进行 WinRM 通信,请勾选 通过 HTTPS 使用 WinRM.
故障排除步骤 2025, ZOHO 公司版权所有。