Disable CRL checking

Posted by

Sometimes we need to install SharePoint on servers that does not have connection to Internet and sometimes this causes problems (for example CRL checkings).

For this reason, I decided to disable CRL checking in this scenarios. To do that I executed the following PowerShell:

#the following statement goes on one line 
set-ItemProperty -path "HKCU:SoftwareMicrosoftWindowsCurrentVersionWinTrustTrust ProvidersSoftware Publishing" -name State -value 146944 
#the following statement goes on one line also 
set-ItemProperty -path "REGISTRY::HKEY_USERS.DefaultSoftwareMicrosoftWindowsCurrentVersionWinTrustTrust ProvidersSoftware Publishing" -name State -value 146944 get-ChildItem REGISTRY::HKEY_USERS | foreach-object {set-ItemProperty -ErrorAction silentlycontinue -path ($_.Name + "SoftwareMicrosoftWindowsCurrentVersionWinTrustTrust ProvidersSoftware Publishing") -name State -value 146944} Write-Host -ForegroundColor White " - Disabling Certificate Revocation List (CRL) check..." ForEach($bitsize in ("","64")) { $xml = [xml](Get-Content $env:windirMicrosoft.NETFramework$bitsizev2.0.50727CONFIGMachine.config) If (!$xml.DocumentElement.SelectSingleNode("runtime")) { $runtime = $xml.CreateElement("runtime") $xml.DocumentElement.AppendChild($runtime) | Out-Null } If (!$xml.DocumentElement.SelectSingleNode("runtime/generatePublisherEvidence")) { $gpe = $xml.CreateElement("generatePublisherEvidence") $xml.DocumentElement.SelectSingleNode("runtime").AppendChild($gpe) | Out-Null } $xml.DocumentElement.SelectSingleNode("runtime/generatePublisherEvidence").SetAttribute("enabled","false") | Out-Null $xml.Save("$env:windirMicrosoft.NETFramework$bitsizev2.0.50727CONFIGMachine.config") }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s