Cumulative update fails due to certificate permissions

%3CLINGO-SUB%20id%3D%22lingo-sub-2276862%22%20slang%3D%22en-US%22%3ECumulative%20update%20fails%20due%20to%20certificate%20permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2276862%22%20slang%3D%22en-US%22%3E%3CP%3EI%20had%20an%20issue%20applying%20CU9%20for%20Exchange%202019%20and%20as%20it%20took%20a%20while%20to%20sort%20I%20thought%20I%20would%20post%20to%20share%20how%20I%20resolved%20it%20in%20case%20it%20helps%20anyone%20else.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20CU%20failed%20at%20Step%208%20of%2010%20Mailbox%20role%3A%20Client%20Access%20Front%20End%20service%20with%20the%20following%20error%3A%3C%2FP%3E%3CP%3EStep%208%20of%2010%20Mailbox%20role%3A%20Client%20Access%20Front%20End%20service%3A%3CBR%20%2F%3EError%3A%3CBR%20%2F%3EThe%20following%20error%20was%20generated%20when%20%22%24error.Clear()%3B%3CBR%20%2F%3EInstall-ExchangeCertificate%20-services%20%22IIS%2C%20POP%2C%20IMAP%22%20-DomainController%20%24RoleDomainController%3CBR%20%2F%3Eif%20(%24RoleIsDatacenter%20-ne%20%24true%20-And%20%24RoleIsPartnerHosted%20-ne%20%24true)%3CBR%20%2F%3E%7B%3CBR%20%2F%3EInstall-AuthCertificate%20-DomainController%20%24RoleDomainController%3CBR%20%2F%3E%7D%3CBR%20%2F%3E%22%20was%20run%3A%20%22Microsoft.Exchange.Management.SystemConfigurationTasks.AddAccessRuleUnauthorizedAccessException%3A%20Insufficient%20rights%20to%20grant%20Network%20Service%20access%20to%20the%20certificate%20with%20thumbprint%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20the%20server%20was%20in%20maintenance%20mode%20I%20was%20unable%20to%20launch%20the%20EMS.%20The%20server%20is%20a%20Windows%202019%20server%20core%20box%20so%20no%20MMC%20to%20launch%20the%20certificate%20snap-in.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHaving%20bashed%20my%20head%20against%20a%20brick%20wall%20trying%20to%20adjust%20permissions%20with%20powershell%20I%20went%20with%20the%20following%20solution.%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3EFirst%20off%20-%20full%20credit%20to%26nbsp%3B%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22author%20vcard%22%3E%3CSPAN%3ERhoderick%20Milne%26nbsp%3B%3C%2FSPAN%3E%26nbsp%3Band%20his%20excellent%20blog%20post%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fblog.rmilne.ca%2F2020%2F11%2F19%2Fexchange-setup-certificate-is-expired-part-deux%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EExchange%20Setup%20%E2%80%93%20Certificate%20Is%20Expired%20%E2%80%93%20Part%20Deux%20%E2%80%93%20250%20Hello%20(rmilne.ca)%3C%2FA%3E%26nbsp%3Bthat%20provided%20me%20with%20some%20helpful%20tips%20to%20get%20around%20the%20problem.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3E2nd%20-%20our%20cert%20is%20a%203rd%20party%20cert%20and%20the%20healthchecker%20script%20that%20MS%20provides%20reports%20no%20issues.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3ESo%20what%20I%20had%20to%20do.%20The%20solution%20was%20to%20swap%20out%20the%203rd%20party%20cert%20for%20a%20self%20signed%20cert%20created%20via%20the%20EMS%20to%20allow%20the%20installation%20to%20complete.%20Once%20done%2C%20I%20swapped%20back%20to%20my%20normal%203rd%20party%20cert.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3EWith%20no%20EMS%20I%20needed%20the%20Exchange%20powershell%20snapin%20%3CEM%3E**as%20Rhoderick%20points%20out%20this%20is%20not%20supported%20but%20it%20worked%20for%20me%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3E%3CEM%3E%3CSPAN%3EAdd-PSSnapin%20Microsoft.Exchange.Management.PowerShell.SnapIn%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3EWith%20the%20exchange%20snap-in%20loaded%20I%20was%20then%20able%20to%20create%20a%20new%20self-signed%20certificate%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3ENew-ExchangeCertificate%20-Services%20SMTP%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3Eand%20then%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%3CSPAN%20class%3D%22author%20vcard%22%3EEnable-ExchangeCertificate%20-Services%20IIS%20-Thumbprint%20XXXXXXXXXXXXXXXXXXXXXXXXXXX%3C%2FSPAN%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3EWith%20the%20new%20cert%20in%20place%20I%20was%20then%20able%20to%20complete%20the%20update%20and%20take%20the%20server%20out%20of%20maintenance%20mode.%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3EFinal%20step%20was%20to%20put%20the%20IIS%20and%20SMTP%20services%20back%20on%20the%20original%20certificate.%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3EBefore%20I%20found%20the%20blog%20post%2C%20I%20had%20logged%20a%20call%20with%20MS%20but%20they%20just%20told%20me%20to%20fix%20the%20certificate%20and%20then%20retry%20the%20update%20without%20telling%20me%20how%20to%20fix%20the%20cert!%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%40FE3C8A5543DEF164D4C09E9B7F45E1A4%2Fimages%2Femoticons%2Ffacepalm_40x40.gif%22%20alt%3D%22%3Afacepalm%3A%22%20title%3D%22%3Afacepalm%3A%22%20%2F%3E%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20data-unlink%3D%22true%22%3EIt%20would%20be%20great%20if%20CUs%20added%20the%20cert%20check%20to%20the%20prereqs%20check%20and%20ideally%20offer%20to%20fix%20the%20cert%20permissions%20problem%20-%20still%20haven't%20found%20a%20way%20to%20check%20and%20verify%20the%20permissions%20a%20CU%20wants%20but%20hopefully%20this%20workaround%20will%20help%20someone%20else%20from%20bashing%20their%20head%20against%20the%20desk.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2276862%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2277219%22%20slang%3D%22en-US%22%3ERe%3A%20Cumulative%20update%20fails%20due%20to%20certificate%20permissions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2277219%22%20slang%3D%22en-US%22%3EGood%20to%20know%20this!%20thank%20you%3C%2FLINGO-BODY%3E
New Contributor

I had an issue applying CU9 for Exchange 2019 and as it took a while to sort I thought I would post to share how I resolved it in case it helps anyone else.

 

The CU failed at Step 8 of 10 Mailbox role: Client Access Front End service with the following error:

Step 8 of 10 Mailbox role: Client Access Front End service:
Error:
The following error was generated when "$error.Clear();
Install-ExchangeCertificate -services "IIS, POP, IMAP" -DomainController $RoleDomainController
if ($RoleIsDatacenter -ne $true -And $RoleIsPartnerHosted -ne $true)
{
Install-AuthCertificate -DomainController $RoleDomainController
}
" was run: "Microsoft.Exchange.Management.SystemConfigurationTasks.AddAccessRuleUnauthorizedAccessException: Insufficient rights to grant Network Service access to the certificate with thumbprint

 

As the server was in maintenance mode I was unable to launch the EMS. The server is a Windows 2019 server core box so no MMC to launch the certificate snap-in.

 

Having bashed my head against a brick wall trying to adjust permissions with powershell I went with the following solution.

First off - full credit to  Rhoderick Milne  and his excellent blog post Exchange Setup – Certificate Is Expired – Part Deux – 250 Hello (rmilne.ca) that provided me with some helpful tips to get around the problem.

 

2nd - our cert is a 3rd party cert and the healthchecker script that MS provides reports no issues.

 

So what I had to do. The solution was to swap out the 3rd party cert for a self signed cert created via the EMS to allow the installation to complete. Once done, I swapped back to my normal 3rd party cert.

 

With no EMS I needed the Exchange powershell snapin **as Rhoderick points out this is not supported but it worked for me

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn

 

With the exchange snap-in loaded I was then able to create a new self-signed certificate

New-ExchangeCertificate -Services SMTP

and then 

Enable-ExchangeCertificate -Services IIS -Thumbprint XXXXXXXXXXXXXXXXXXXXXXXXXXX

 

With the new cert in place I was then able to complete the update and take the server out of maintenance mode.

 

Final step was to put the IIS and SMTP services back on the original certificate.

 

Before I found the blog post, I had logged a call with MS but they just told me to fix the certificate and then retry the update without telling me how to fix the cert! :facepalm:

 

It would be great if CUs added the cert check to the prereqs check and ideally offer to fix the cert permissions problem - still haven't found a way to check and verify the permissions a CU wants but hopefully this workaround will help someone else from bashing their head against the desk.

1 Reply
Good to know this! thank you