SharePoint Management Shell takes longer than 5 seconds to load

managementshellslow

Today we got the question from a SharePoint administration team that the SharePoint 2010 Management Shell (a Windows PowerShell environment specifically for managing SharePoint) was very slow. It was only available after waiting for more than 2 minutes!

This has led to the fact that the administrators no longer used the SharePoint PowerShell commands. They did all the modifications on the different farms manually. You probably already know that this is not a best practice.

Facts:

  • Their farms have no internet connection.
  • SharePoint Root certificate was not available in the Trusted Root Certificate Authorities. (http://support.microsoft.com/kb/2625048)
  • Certificate validation failures were present in the CAPI2 event logs.

Question:

  • Decrease the load time of the SharePoint Management Shell below 10 seconds.

Resolution:

  • Disable CRL check for these farms
  • Making sure that if the farms are connected one day, tampering is not an option.
    • Update host file to route crl.microsoft.com to localhost.

Description:

Most Microsoft assemblies are digitally signed. Each time signed assemblies are loaded, default system behavior is to check with the owner of the root certificate that the cert with which the assembly was signed is still valid.

In the case of Microsoft assemblies, this means a connection is made to crl.microsoft.com in order to read the Certificate Revocation List.

While these farms have no internet connection, the CRL check while perform several different attempts to reach crl.microsoft.com, but each attempt will time-out.

It is this time-out that causes the latency.

Quick fix (This will disable the CRL check, but only for the current user)

  • On the SharePoint server where you want to open the Management Shell
  • Open Internet Explorer
  • Tools
  • Internet Options
  • Advanced
  • Disable the options related to certification revocation.

CRLcheck

After deselecting these options, retry to open the SharePoint PowerShell Administration Shell.The Shell opened in less than 3 seconds.

General Solution:

As my colleague PFE Wesley De bolster already explained in his blog post about SharePoint 2013 Machine Translations: The translation failed because the online translation service was unavailable, there is a group policy setting that allows you to disable the automatically update certificates in the Microsoft Root certificate program.

  • Ctrl+R (Run)
  • Type gpedit.msc
  • Open Public Key Policies
  • Double click on Certificate Path Validation Settings
  • Check “Define these policy settings”
  • Uncheck automatically update certificates in the Microsoft Root certificate program.
  • Change both default retrieval timeout settings to 1
  • OK
  • Run “gpupdate /force”

References:

http://joelblogs.co.uk/2011/09/20/certificate-revocation-list-check-and-sharepoint-2010-without-an-internet-connection/
http://support.microsoft.com/kb/2625048
http://www.bhargavs.com/index.php/2009/07/11/exchange-2007-rollup-update-installation-hang-managed-code-services-do-not-start/
http://blogs.msdn.com/b/weslbo/archive/2012/11/07/sharepoint-2013-machine-translations-the-translation-failed-because-the-online-translation-service-was-unavailable.aspx
http://blogs.msdn.com/b/spses/archive/2012/08/29/crl-verification-failure-sharepoint.aspx

VN:F [1.9.22_1171]
Rating: 9.8/10 (10 votes cast)
VN:F [1.9.22_1171]
Rating: +7 (from 7 votes)

An error occurred whilst trying to load some required components, Please ensure the following prerequisite components are installed. Microsoft Web Developer Tools Microsoft Exchange Web Services”

Visual Studio 2012 provides a great environment for dev/test SharePoint 2013 Apps.
This is true both for scenarios where you want to dev/test in the cloud and then run the app in the cloud, as well as for scenarios where you want to dev/test in the cloud and then run the app using an existing on-premises environment.

If you want to create a SharePoint 2013 app and your receive the following exception, follow the next step by step guide to resolve this issue.

ewserror

  1. Close the messagebox and Visual Studio.
  2. Type appwiz.cpl in Run, this will open the Add/Remove Programs control window.
  3. Uninstall Microsoft Exchange Web Services Managed API 2.0
  4. Right click the EwsManagedApi32.msi link and use the Save link as option to store the msi in c:\downloads
  5. Navigate to c:\downloads and type cmd in the adres bar (this will open the command prompt with c:\downloads as location)
  6. Type dir and make sure EwsManagedApi32.msi is listed in the console window
  7. Type EwsManagedApi32.msi addlocal=”ExchangeWebServicesApi_Feature,ExchangeWebServicesApi_Gac”
  8. complete the installation procedure
  9. Open Visual Studio 2012 and start a new SharePoint 2013 App project.

More information:

Hope it helps!

</Tom>

VN:F [1.9.22_1171]
Rating: 9.8/10 (6 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 5 votes)