среда, 13 июля 2016 г.

Изменение привязки OOS к серверу SharePoint 2016

Как уже известно, OOS (Office Online Server) в SharePoint 2016 заменил OWA (Сервер Office Web Apps) используемого в SharePoint 2013. В этой статье я расскажу, как поменять привязку в SharePoint 2016. К примеру, из одного сервера OOS выросла ферма из нескольких серверов и имя поменялось.
Первое что делаем, это удаляем существующие привязки.

1
Remove-SPWOPIBinding -All:$true

Начинаем выполнять скрип по создания новой привязки (пример с http)
1
2
3
4
5
6
7
8
9
10
11
12
13
New-SPWOPIBinding -ServerName oos.contoso.com -AllowHTTP
 
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
Set-SPWOPIZone -zone "internal-http"
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
 
$config = (Get-SPSecurityTokenServiceConfig)
$config.Update()
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
 
$Farm = Get-SPFarm
$Farm.Properties.Add("WopiLegacySoapSupport", "https://oos.contoso.com/x/_vti_bin/ExcelServiceInternal.asmx");
$Farm.Update();


Но сталкиваемся с ошибкой, что ключ 'WopiLegacySoapSupport'
 уже существует.
Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'WopiLegacySoapSupport'  Key being added: 'WopiLegacySoapSupport'"At line:12 char:1


Нам потребуется в начале удалить скрипт и запустить все по новой. Вот полный скрипт по изменению привязки

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Remove-SPWOPIBinding -All:$true
$Farm = Get-SPFarm
$Farm.Properties.Remove("WopiLegacySoapSupport")
$Farm.Update();
 
 
New-SPWOPIBinding -ServerName oos.contoso.com -AllowHTTP
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
Set-SPWOPIZone -zone "internal-http"
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
$config = (Get-SPSecurityTokenServiceConfig)
$config.Update()
(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
 
$Farm = Get-SPFarm
$Farm.Properties.Add("WopiLegacySoapSupport", "https://oos.contoso.com/x/_vti_bin/ExcelServiceInternal.asmx");
$Farm.Update();

Посмотреть свойства можно выполнив скрипт

1
2
3
$Farm = Get-SPFarm
 
$Farm.Properties




1 комментарий: