-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRun-OOS-with-SP2016.ps1
More file actions
94 lines (85 loc) · 4.52 KB
/
Run-OOS-with-SP2016.ps1
File metadata and controls
94 lines (85 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<#
.SYNOPSIS
Install SharePoint 2016 and Office Online Server (OOS) on the same PC
.DESCRIPTION
1) Install OOS
2) Rename 37 registry keys to bypass detection from SETUP.EXE in SharePoint Server.
3) Install SharEPoint Server 2016
4) Rename 37 registry keys back
NOTE - Please run PowerShell window as admin
Comments and suggestions always welcome! spjeff@spjeff.com or @spjeff
.NOTES
File Name : Run-OOS-with-SP2016.ps1
Author : Jeff Jones - @spjeff
Version : 0.11
Last Modified : 01-29-2019
.LINK
http://www.github.com/spjeff/spadmin/run-oos-with-sp2016.ps1
http://www.spjeff.com/2016/10/13/install-oos-sharepoint-2016-pc/
#>
param (
[switch]$disable
)
# connect HKEY_CLASSES_ROOT
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
# registry keys for Offline Online Server (OOS)
$oos = @"
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109151100000100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109251100000100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109351190400100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109F10110400100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109F10170400100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109F10190400100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109F10191400100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109F101A0C00100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\00006109F101C0400100000000F01FEC
HKCR:\Installer\Products\00006109151100000100000000F01FEC
HKCR:\Installer\Products\00006109251100000100000000F01FEC
HKCR:\Installer\Products\00006109351190400100000000F01FEC
HKCR:\Installer\Products\00006109F10110400100000000F01FEC
HKCR:\Installer\Products\00006109F10170400100000000F01FEC
HKCR:\Installer\Products\00006109F10190400100000000F01FEC
HKCR:\Installer\Products\00006109F10191400100000000F01FEC
HKCR:\Installer\Products\00006109F101A0C00100000000F01FEC
HKCR:\Installer\Products\00006109F101C0400100000000F01FEC
HKCR:\Installer\Features\00006109151100000100000000F01FEC
HKCR:\Installer\Features\00006109251100000100000000F01FEC
HKCR:\Installer\Features\00006109351190400100000000F01FEC
HKCR:\Installer\Features\00006109F10110400100000000F01FEC
HKCR:\Installer\Features\00006109F10170400100000000F01FEC
HKCR:\Installer\Features\00006109F10190400100000000F01FEC
HKCR:\Installer\Features\00006109F10191400100000000F01FEC
HKCR:\Installer\Features\00006109F101A0C00100000000F01FEC
HKCR:\Installer\Features\00006109F101C0400100000000F01FEC
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-101F-0401-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-101F-0407-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-101F-0409-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-101F-040C-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-101F-0419-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-101F-0C0A-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-1151-0000-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-1152-0000-1000-0000000FF1CE}
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90160000-1153-0409-1000-0000000FF1CE}
"@.Split("`r`n")
# rename keys to bypass detection of OOS from SharePoint SETUP.EXE
if (!$disable) {
Write-Host "ENABLE BLOCK" -Fore Yellow
foreach ($key in $oos) {
if ($key) {
$split = $key.Split("\\")
$name = $split[$split.length-1]
Rename-Item "$key" $name.Replace("0F01FEC","0F01FED").Replace("0FF1CE","0FF1DE")
}
}
Write-Host "now ready for SharePoint 2016 SETUP.EXE" -Fore Green
} else {
Write-Host "DISABLE BLOCK" -Fore Yellow
foreach ($key in $oos) {
if ($key) {
$split = $key.Split("\\")
$name = $split[$split.length-1]
Rename-Item $key.Replace("0F01FEC","0F01FED").Replace("0FF1CE","0FF1DE") "$name"
}
}
Write-Host "OOS keys back to original names" -Fore Green
}