Pre- and Post-Commands for Patch Management
The Add2Exchange replication server should be updated as a complete system, not treated like a typical workstation or general-purpose server. This machine runs a service-based synchronization workload and is normally a low-risk target from an end-user activity standpoint. Because of that, it should usually be handled with controlled maintenance procedures, targeted exclusions, and a deliberate update process designed to protect uninterrupted sync operations.
Many organizations find that their existing RMM or patch platform cannot reliably perform this process end to end. In those cases, the easiest path is often to exclude the replication server from normal patch automation and instead update it manually on a controlled schedule, or have it recertified as part of Premier Support maintenance.
Recommended Update Approach
For the most reliable results, update the replication server as a whole. That means reviewing and maintaining Add2Exchange, Microsoft Office, and Windows updates together rather than allowing unmanaged or partially automated patching to occur independently. The preferred process is the Level 2 upgrade procedure for updating Add2Exchange, Windows, and Microsoft Office together.
If your organization must manage this server through patch management software, confirm that your tool can execute the required pre- and post-command workflow exactly as outlined below. If it cannot, the server should be placed into a special update exception or removed from normal patch automation so it can be maintained using the correct process.
Why This Server Should Be Treated Differently
This server is not used like a normal desktop or shared server. There is typically no active user browsing the web, opening documents, or interacting with Office during normal operation. It is a specialized sync engine running as a service. Because of that, it should not be patched under the same assumptions as a general workstation fleet.
A stable replication server usually requires:
- a controlled patch cadence
- antivirus exclusions for specific folders
- MFA exclusions for the sync machine and service account, paired with strict conditional access controls
- support for autologon where required
- a pre- and post-command sequence that protects the Add2Exchange service during maintenance
Pre-Update Commands
Before applying updates, stop the Add2Exchange Service. The source text lists the following examples:
Net stop "Add2Exchange Service"
or
PS\netbiosname Stop "Add2Exchange Service"
After the service is stopped, install all required Microsoft Windows critical updates, including Microsoft products on the server. Microsoft Office updates may also be installed, but if Office updates are skipped, the Outlook profile reset step described below does not need to be run.
This is the area where many RMM tools fail. It is not enough to simply push patches. The tool must be able to stop the service first, wait for updates to complete, run the required post-update script if Office changed, and then reboot the server while the service remains stopped.
Post-Update Commands
If Microsoft Office was updated, run the PowerShell script Outlook_profile_set.ps1 after the Office update process has completed. The original guidance says to run this script after every successful or unsuccessful Microsoft Office update attempt, every time. This step is intended to restore or enforce the Outlook profile and related settings required by Add2Exchange.
After all updates are complete, and while the Add2Exchange Service is still stopped, reboot the server with:
shutdown -r -t 0
The server will then reboot, apply updates, and return to service. In Microsoft 365 environments, the server may also autologon and lock again if configured accordingly.
Operational Exceptions Required for Stability
To support reliable unattended maintenance and continued automation, the replication server may require operational exceptions that differ from standard endpoint policy.
Login and Autologon Considerations
Any login banner or interactive security product that interrupts autologon can prevent the server from recovering cleanly after updates. Tools such as Duo or similar login interceptors may stop automatic sign-in, which can in turn prevent post-update validation and force IT staff to manually log back in before normal sync operations can be verified. Where that interferes with automation, an exclusion should be considered.
Antivirus Exclusions
The source text recommends excluding the following default locations from active antivirus file scanning:
C:\Program Files (x86)\OpenDoor Software®\
C:\Program Files (x86)\DidItBetterSoftware
C:\Program Files\Microsoft SQL Server\
C:\Users\zadd2exchange\AppData
C:\Zlibrary
Note that the OpenDoor Software path includes the registered trademark character in the folder name. Copying and pasting the exact path is recommended when creating antivirus exclusions.
MFA and Conditional Access
The sync service account must be able to sign in without interactive challenge if the system is expected to run fully automated maintenance and onboarding tasks. The source guidance explicitly notes that MFA on the sync service account can stop complete automation. In practice, this usually means creating a tightly controlled exception for the replication server and service account rather than treating them like normal user identities.
End-of-Session Guidance
When leaving the machine, keep the service account session locked or disconnect the session while leaving the account logged in, as appropriate for your operational model. This helps preserve the environment expected by the synchronization system.
Summary
The replication server should not be patched casually or as part of broad, generic endpoint policy. It should be updated in a coordinated way, with the Add2Exchange Service stopped first, Windows and Microsoft products updated in a controlled maintenance window, the Outlook profile reset script run after Office updates, and the system rebooted before returning to normal operation. If your RMM platform cannot perform that workflow reliably, the safer approach is to exclude the server from standard patch automation and maintain it separately.
Outlook Profile Reset Script After Microsoft Office Updates
Make and run this file after Microsoft Office updates. Save the following as Outlook_profile_set.ps1 and run it as PowerShell.
Show Outlook_profile_set.ps1
<#
.SYNOPSIS
Outlook Profile Setup
.DESCRIPTION
Setup Outlook profile for Add2Exchange
Setup GAL Options
Setup Send/Receive
Disables COM Add-ins
Sets Options
Disables Outlook Popups
.NOTES
Version: 3.2023
Author: DidItBetter Software
#>
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator))
{
Start-Process powershell.exe "-File", ('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs
exit
}
Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
Start-Transcript -Path "C:\Program Files (x86)\DidItBetterSoftware\Support\A2E_PowerShell_log.txt" -Append
# Check Outlook Version
$Version = Get-ItemProperty "Registry::HKEY_CLASSES_ROOT\Outlook.Application\CurVer" |
Select-Object -ExpandProperty '(default)' -ErrorAction SilentlyContinue -ErrorVariable E1
if ($E1) {
Write-Host "There seems to be an error or conflict in Outlook Versions. Exiting"
Pause
Exit
}
####### Outlook V16 #######
if ($Version -eq "Outlook.Application.16") {
Write-Host "Checking Profile Names"
$Profile = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\WOW6432Node\OpenDoor Software®\Add2Exchange" -Name ServiceAccount
Write-Host "Add2Exchange Profile in use is $Profile"
Write-Host "Writing $Profile Profile Changes...."
# Address Book
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile\9207f3e0a3b11019908b08002b2a56c2" -Name "01023d06" -Value ([byte[]](0x00,0x00,0x00,0x00,0xb1,0x84,0xb4,0xea,0xd0,0xab,0xcb,0x41,0xa8,0xd0,0x0d,0xea,0x0c,0x29,0xb0,0x44,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x2f,0x00))
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile\0a0d020000000000c000000000000046" -Name "000b3d1c" -Value ([byte[]](0x00,0x00))
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile\0a0d020000000000c000000000000046" -Name "00033d1b" -Value ([byte[]](0x01,0x00,0x00,0x00))
# Trust Center
$Privacy = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy"
if (-not $Privacy) {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "Privacy"
}
$Anonymous = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy\SettingsStore\Anonymous"
if ($Anonymous) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesState" -Value 2
$Date = Get-Date -Format 'yyy\-MM\-ddTHH:mm:ssZ'
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesStateTime" -Value $Date
}
else {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy" -Name "SettingsStore"
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy\SettingsStore" -Name "Anonymous"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesState" -Value 2
$Date = Get-Date -Format 'yyy\-MM\-ddTHH:mm:ssZ'
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesStateTime" -Value $Date
}
$Profile1 = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile\c02ebc5353d9cd11975200aa004ae40e"
if ($Profile1) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile\c02ebc5353d9cd11975200aa004ae40e" -Name "00030354" -Value ([byte[]](0x00,0x00,0x00,0x00))
}
else {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile" -Name "c02ebc5353d9cd11975200aa004ae40e"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Profiles\$Profile\c02ebc5353d9cd11975200aa004ae40e" -Name "00030354" -Value ([byte[]](0x00,0x00,0x00,0x00))
}
$Security = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Security"
if (-not $Security) {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook" -Name "Security"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Security" -Name "InitEncrypt" -Value 2
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Security" -Name "InitSign" -Value 2
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Security" -Name "SharedFolderScript" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Security" -Name "PublicFolderScript" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Security" -Name "Level" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Preferences" -Name "DisableAttachmentPreviewing" -Value 1
$Mail = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail"
if ($Mail) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockSafeZone" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockSpecificSenders" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockRSS" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockSTS" -Value 0
}
else {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options" -Name "Mail"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockSafeZone" -Value 0
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockSpecificSenders" -Value 0
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockRSS" -Value 0
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\Mail" -Name "UnblockSTS" -Value 0
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "SendCustomerDataOptInReason" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "SendCustomerDataOptIn" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "SendCustomerData" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "UpdateReliabilityData" -Value 0
$HelpViewer = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Common\HelpViewer"
if (-not $HelpViewer) {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "HelpViewer"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\HelpViewer" -Name "UseOnlineContent" -Value 2
$PTWatson = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Common\PTWatson"
if (-not $PTWatson) {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Common" -Name "PTWatson"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\PTWatson" -Name "PTWOptIn" -Value 3
$ResearchOptions = Test-Path "HKCU:\Software\Microsoft\Office\16.0\Common\Research\Options"
if (-not $ResearchOptions) {
New-Item -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Research" -Name "Options"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\Research\Options" -Name "DiscoveryNeedOptIn" -Value 0
$Security = Test-Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\16.0\Outlook\Security"
if ($Security) {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\16.0\Outlook\Security" -Name "ObjectModelGuard" -Value 2
}
else {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\16.0\Outlook" -Name "Security"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\16.0\Outlook\Security" -Name "ObjectModelGuard" -Value 2
}
Write-Host "Disabling Outlook Social Connector"
Start-Process Powershell .\OSC_Disable.bat
Write-Host "Done"
Write-Host "Disabling Outlook Updates"
$Val = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -Name "UpdatesEnabled"
if ($Val.UpdatesEnabled -eq $true) {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -Name "UpdatesEnabled" -Value $false
Write-Host "Outlook Updates are now Disabled!"
}
else {
Write-Host "Outlook Updates Already Disabled!"
}
Write-Host "Disabling Teaching Callouts"
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "AutoSaveTottleOnWord" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "MeetingAllowForwardTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "AutoSaveFirstSaveWord" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "CommingSoonTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "AutocreateTeachingCallout_MoreLocations" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "Search.TopResults" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "UseTighterSpacingTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "SLRToggleReplaceTeachingCalloutID" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "DataVisualizerRibbonTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "ExportToWordProcessTabTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\16.0\Common\TeachingCallouts" -Name "PreviewPlaceUpdate" -Value 0 -ErrorAction SilentlyContinue
}
####### Outlook V15 #######
if ($Version -eq "Outlook.Application.15") {
Write-Host "Checking Profile Names"
$Profile = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\WOW6432Node\OpenDoor Software®\Add2Exchange" -Name ServiceAccount
Write-Host "Add2Exchange Profile in use is $Profile"
Write-Host "Writing $Profile Profile Changes...."
# Address Book
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile\9207f3e0a3b11019908b08002b2a56c2" -Name "01023d06" -Value ([byte[]](0x00,0x00,0x00,0x00,0xb1,0x84,0xb4,0xea,0xd0,0xab,0xcb,0x41,0xa8,0xd0,0x0d,0xea,0x0c,0x29,0xb0,0x44,0x01,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x2f,0x00))
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile\0a0d020000000000c000000000000046" -Name "000b3d1c" -Value ([byte[]](0x00,0x00))
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile\0a0d020000000000c000000000000046" -Name "00033d1b" -Value ([byte[]](0x01,0x00,0x00,0x00))
# Trust Center
$Privacy = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy"
if (-not $Privacy) {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "Privacy"
}
$Anonymous = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy\SettingsStore\Anonymous"
if ($Anonymous) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesState" -Value 2
$Date = Get-Date -Format 'yyy\-MM\-ddTHH:mm:ssZ'
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesStateTime" -Value $Date
}
else {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy" -Name "SettingsStore"
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy\SettingsStore" -Name "Anonymous"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesState" -Value 2
$Date = Get-Date -Format 'yyy\-MM\-ddTHH:mm:ssZ'
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Privacy\SettingsStore\Anonymous" -Name "ControllerConnectedServicesStateTime" -Value $Date
}
$Profile1 = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile\c02ebc5353d9cd11975200aa004ae40e"
if ($Profile1) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile\c02ebc5353d9cd11975200aa004ae40e" -Name "00030354" -Value ([byte[]](0x00,0x00,0x00,0x00))
}
else {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile" -Name "c02ebc5353d9cd11975200aa004ae40e"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Profiles\$Profile\c02ebc5353d9cd11975200aa004ae40e" -Name "00030354" -Value ([byte[]](0x00,0x00,0x00,0x00))
}
$Security = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Security"
if (-not $Security) {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook" -Name "Security"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Security" -Name "InitEncrypt" -Value 2
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Security" -Name "InitSign" -Value 2
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Security" -Name "SharedFolderScript" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Security" -Name "PublicFolderScript" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Security" -Name "Level" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Preferences" -Name "DisableAttachmentPreviewing" -Value 1
$Mail = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail"
if ($Mail) {
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockSafeZone" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockSpecificSenders" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockRSS" -Value 0
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockSTS" -Value 0
}
else {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options" -Name "Mail"
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockSafeZone" -Value 0
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockSpecificSenders" -Value 0
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockRSS" -Value 0
New-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Outlook\Options\Mail" -Name "UnblockSTS" -Value 0
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "SendCustomerDataOptInReason" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "SendCustomerDataOptIn" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "SendCustomerData" -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "UpdateReliabilityData" -Value 0
$HelpViewer = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Common\HelpViewer"
if (-not $HelpViewer) {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "HelpViewer"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\HelpViewer" -Name "UseOnlineContent" -Value 2
$PTWatson = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Common\PTWatson"
if (-not $PTWatson) {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Common" -Name "PTWatson"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\PTWatson" -Name "PTWOptIn" -Value 3
$ResearchOptions = Test-Path "HKCU:\Software\Microsoft\Office\15.0\Common\Research\Options"
if (-not $ResearchOptions) {
New-Item -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Research" -Name "Options"
}
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\Research\Options" -Name "DiscoveryNeedOptIn" -Value 0
$Security = Test-Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\15.0\Outlook\Security"
if ($Security) {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\15.0\Outlook\Security" -Name "ObjectModelGuard" -Value 2
}
else {
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\15.0\Outlook" -Name "Security"
New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\15.0\Outlook\Security" -Name "ObjectModelGuard" -Value 2
}
Write-Host "Disabling Outlook Social Connector"
Start-Process Powershell .\OSC_Disable.bat
Write-Host "Done"
Write-Host "Disabling Outlook Updates"
$Val = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -Name "UpdatesEnabled"
if ($Val.UpdatesEnabled -eq $true) {
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -Name "UpdatesEnabled" -Value $false
Write-Host "Outlook Updates are now Disabled!"
}
else {
Write-Host "Outlook Updates Already Disabled!"
}
Write-Host "Disabling Teaching Callouts"
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "AutoSaveTottleOnWord" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "MeetingAllowForwardTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "AutoSaveFirstSaveWord" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "CommingSoonTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "AutocreateTeachingCallout_MoreLocations" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "Search.TopResults" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "UseTighterSpacingTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "SLRToggleReplaceTeachingCalloutID" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "DataVisualizerRibbonTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "ExportToWordProcessTabTeachingCallout" -Value 0 -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Office\15.0\Common\TeachingCallouts" -Name "PreviewPlaceUpdate" -Value 0 -ErrorAction SilentlyContinue
}
####### Outlook Not Supported #######
if ($Version -eq "Outlook.Application.14") {
Write-Host "This version of Outlook is not supported"
}
Write-Host "ttyl"
Get-PSSession | Remove-PSSession
Exit
End of script.