Trying to automate Exchange 2010 certificate renewal


#1

Hi,

I am using 2011SBS (ie. 2008R2 server). I want to automatically replace the exchange server certificate - and the default powershell script that ships with CertifyTheWeb looks like it should be able to do it.

However, I get the error:
An unexpected error has occurred and a watson dump is being generated: mixed mode assembly is built against verison ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
Enable-ExchangeCertificate: Value cannot be null.
Parameter name: serverSettings
At c:…

Google is not really giving me great answers, and I’m no powershell expert so any help gratefully received.

Thanks

Richard


#2

Hi Richard,

If you manually run any of the Exchange powershell cmdlets from a 64-bit powershell prompt so they work OK? This error is saying that we’re running .Net 4.x but the command it’s trying to run is .net 2.x (…net 2 to 3.5). Can you identify which version of Powershell you have installed? This is installed as part of the Windows Management Framework. https://docs.microsoft.com/en-us/powershell/wmf/overview

I’m actually looking at closer integration of services like Exchange with a new ‘deployment tasks’ feature: https://github.com/webprofusion/certify/issues/440 having said that though it’s unlikely that we will officially support SBS 2011 as we can only support products still supported/patched by their vendors (e.g. Microsoft) and that appears to have a max end of life of Jan 2020.


#3

Another thing you might want to try is spawning a new powershell process within the script, then running the commands you need: