Site slowness because of SharePoint STS certificate CRL checking

August 17, 2022

Export the SharePoint Root Authority certificate as a physical (.cer) file. Start the SharePoint 2010 Management Shell as an Administrator, and then run the following Windows PowerShell commands:

$rootCert = (Get-SPCertificateAuthority).RootCertificate   
$rootCert.Export("Cert") | Set-Content C:\SharePointRootAuthority.cer -Encoding byte
  1. Import the SharePoint Root Authority certificate to the Trusted Root Certification Authorities store. To add the SharePoint Root Authority certificate to the Trusted Root Certification Authorities store, follow these steps:Note “Administrators” is the minimum required group membership to complete these steps.
    1. Tap or click Start, type mmc in Start search, and then press Enter.
    2. On the File menu, click Add/Remove Snap-in.
    3. Under Available snap-ins, click Certificates, and then click Add.
    4. Under This snap-in will always manage certificates for, select Computer account, and then click Next.
    5. Select Local computer, and then click Finish.
    6. If you have no more snap-ins to add to the console, click OK.
    7. In the console tree, double-click Certificates.
    8. Right-click the Trusted Root Certification Authorities store.
    9. Click All Tasks, click Import to import the certificate, and then follow the steps in the Certificate Import Wizard.

Source: https://docs.microsoft.com/en-US/sharepoint/troubleshoot/sites/site-slowness-because-of-sts-certificate-crl-checking


Add primary or secondary site collection admin using Micrsoft PowerShell

July 13, 2021

Open the SharePoint Management Shell

At the PowerShell command prompt, type the follwing command to replace the secondar site collection administrator

Set-SPSite -Identity "<SiteCollection>" -SecondaryOwnerAlias "<User>"

Where:

  • <SiteCollection> is the URL of the site collection to which you want to add site collection admin
  • <User> is name of the user whom you want to add in the format <domain>\<username>.

Reference:

https://docs.microsoft.com/en-us/sharepoint/sites/change-site-collection-administrators


Convert word to pdf using Word Automation Services

October 20, 2019

Add-Type -Path ‘C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Office.Word.Server\v4.0_16.0.0.0__71e9bce111e9429c\Microsoft.Office.Word.Server.dll’
$jobSettings = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJobSettings
$jobSettings.OutputFormat = “PDF”
$jobSettings.EmbedFonts = $true
$jobSettings.DefaultLanguage = “ar-SA”
$job = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJob(“Word Automation Services”, $jobSettings)
$job.UserToken = (Get-SPWeb http://localhost:90).CurrentUser.UserToken
$job.AddFile(“/Documents/source.docx”, “/Documents/output.pdf”)
$job.Start()
Start-SPTimerJob “Word Automation Services”


How to Export a SharePoint 2013 List with Lookup Columns

May 26, 2019

Reference:

How to Export a SharePoint 2013 List with Lookup Columns


Clear cached items from the distributed cache server

March 18, 2019

Following Powershell command removes all the cache items for distributed token cache.

Clear-SPDistributedCacheItem -ContainerType DistributedLogonTokenCache

It must be run on all server in the farm running distributed cache service