SharePoint2016 - 使用SharePoint Configuration Wizard创建新Farm失败的解决方案

最近搭建SharePoint2016新Farm时候遇到一个问题,在SharePoint2016安装包安装完成后,执行SharePoint Configuration Wizard新建Farm时弹出下面错误:

New-SPConfigurationDatabase : One or more types failed to load. Please refer to the upgrade log for more details..

SharePoint2016 - 使用SharePoint Configuration Wizard创建新Farm失败的解决方案

此时在查看ULS log中搜索ERR,可以看到下面错误:

Error Exception: Could not load file or assembly ‘Microsoft.Data.Odata’

Error failed to call GetTypes()

通过查询主要是因为SharePoint必要组件“Microsoft WCF Data Services ”安装的有问题。可以通过下面步骤解决:

1. 卸载已经安装的Microsoft WCF Data Services

2. 卸载完成后,使用下面Windows PowerShell脚本重新安装Microsoft WCF Data Services

    $SharePoint2016Path = "D:\PreReq"

    Start-Process "E:\PrerequisiteInstaller.exe" –ArgumentList "/wcfdataservices56:$SharePoint2016Path\WcfDataServices.exe"

3. 到SQL Server中删除创建失败的SharePoint Admin Database和Config Database

4. 重新执行SharePoint PowerShell新建Farm,创建成功

SharePoint2016 - 使用SharePoint Configuration Wizard创建新Farm失败的解决方案

5. 可以继续进行SharePoint配置等后续步骤

感谢阅读。