I had the issue and the official scripts didn’t help at all — they didn’t fix anything. I always restart the server before applying anything, disable the AV, put it into maintenance mode, and run as Administrator via Command Prompt.
I ended up creating a script that initializes things, and just to be safe I also ran the CAS rebuild:
#learn.microsoft.com/en-us/troubleshoot/exchange/client-connectivity/owa-stops-working-after-update
cd "C:\Program Files\Microsoft\Exchange Server\V15\Bin"
.\UpdateCas.ps1
.\UpdateConfigFiles.ps1
iisreset /restart
PS C:\Windows\system32> cd "E:\Program Files\Microsoft\Exchange Server\V15\Bin"
PS E:\Program Files\Microsoft\Exchange Server\V15\Bin> Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Setup -ErrorAction SilentlyContinue
PS E:\Program Files\Microsoft\Exchange Server\V15\Bin> .\ServiceControl.ps1 AfterPatch
WARNING: 'FMS' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'hostcontrollerservice' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'IISAdmin' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeADTopology' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeAntispamUpdate' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeDagMgmt' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeDelivery' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeDiagnostics' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeEdgeSync' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeFastSearch' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeFrontendTransport' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeHM' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeHMRecovery' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeIMAP4' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeIMAP4BE' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeIS' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeMailboxAssistants' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeMailboxReplication' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangePOP3' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangePOP3BE' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeRepl' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeRPC' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeServiceHost' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeSubmission' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeThrottling' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeTransport' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'MSExchangeTransportLogSearch' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'pla' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'RemoteRegistry' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'SearchExchangeTracing' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'W3Svc' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'WinMgmt' did not exist, this is not an error as the sevice might have just been installed
WARNING: 'wsbexchange' did not exist, this is not an error as the sevice might have just been installed
Write-ExchangeSetupLog : The term 'Write-ExchangeSetupLog' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At E:\Program Files\Microsoft\Exchange Server\V15\Bin\ServiceControl.ps1:669 char:4
+ Write-ExchangeSetupLog -Info $line
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Write-ExchangeSetupLog:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
# PowerShell (Run as Administrator)
$services = @(
# IIS / Windows
'IISADMIN','pla','W3SVC',
# Exchange (do print)
'MSExchangeADTopology',
'MSExchangeAntispamUpdate',
'MSExchangeDagMgmt',
'MSExchangeDiagnostics',
'MSExchangeEdgeSync',
'MSExchangeFrontEndTransport',
'MSExchangeHM',
'MSExchangeHMRecovery',
'MSExchangeImap4',
'MSExchangeIMAP4BE',
'MSExchangeIS',
'MSExchangeMailboxAssistants',
'MSExchangeMailboxReplication',
'MSExchangeDelivery',
'MSExchangeSubmission',
'MSExchangePop3',
'MSExchangePOP3BE',
'MSExchangeRepl',
'MSExchangeRPC',
'MSExchangeFastSearch', # Microsoft Exchange Search
'HostControllerService', # Microsoft Exchange Search Host Controller
'MSExchangeServiceHost',
'MSExchangeThrottling',
'MSExchangeTransport',
'MSExchangeTransportLogSearch',
'SearchExchangeTracing',
'wsbexchange'
)
foreach ($s in $services) {
$svc = Get-Service -Name $s -ErrorAction SilentlyContinue
if (-not $svc) { Write-Host "Nao existe: $s"; continue }
try { Set-Service -Name $s -StartupType Automatic -ErrorAction Stop }
catch { Write-Host "Falha Set Automatic: $s -> $($_.Exception.Message)" }
try { Start-Service -Name $s -ErrorAction Stop }
catch { Write-Host "Falha Start: $s -> $($_.Exception.Message)" }
}
# Checagem final
Get-Service -Name $services -ErrorAction SilentlyContinue |
Select Name,StartType,Status |
Sort Name |
Format-Table -Auto