Showing posts with label FAST Search Certificate. Show all posts
Showing posts with label FAST Search Certificate. Show all posts

Thursday, November 12, 2015

Renew FAST Search Certificate in SharePoint 2010 - PowerShell Script

Requirement: Renew  or associate a certificate (self signed) for FAST Search - SharePoint 2010. In development environment, the FAST Search certificates usually expire every year.

Solution: Automate the renewal of certificate through a PowerShell script

PowerShell Script:

-------------------------------------------------------------------------------------------------------------------------
###################################
# Apply Certificate to FAST
###################################

Clear
Remove-PSSnapin AdminSnapIn -ErrorAction SilentlyContinue
Remove-PSSnapin Microsoft.FASTSearch.PowerShell -ErrorAction SilentlyContinue
Remove-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

Add-PSSnapin AdminSnapIn
Add-PSSnapin Microsoft.FASTSearch.PowerShell
Add-PSSnapin Microsoft.SharePoint.PowerShell

write-host "Applying Certificate to FAST" -ForegroundColor Green
#Release worker processess with IISRESET
iisreset

stop-service FAST*

$installerdir = $env:FASTSEARCH + "installer\scripts"
echo $installerdir
cd $installerdir
$pw = ConvertTo-SecureString -AsPlainText -force test
.\ReplaceDefaultCertificate.ps1 -generateNewCertificate $true -certificatePassword $pw
$cert = @(dir cert:\LocalMachine\My -recurse | ? { $_.Subject -eq 'CN=FASTSearchCert' })[0]
$thumb = $cert.Thumbprint

Start-service FAST*

.\SecureFASTSearchConnector.ps1 -certThumbprint $thumb -ssaName "FAST Content" -username "domain\spfastserviceaccount"


-------------------------------------------------------------------------------------------------------------------------


Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...