https://blog.victorvogelpoel.nl/2014/02/03/powershell-recreate-sharepoint-web-services-web-application-bindings/

# Recreate web bindings for the SharePoint 2013 webservice webapp "SharePoint Web Services"
# Victor Vogelpoel Feb 2013
 
$webappName = "SharePoint Web Services"
 
if (!(Get-WebBinding -name $webappName -protocol "https" -port 32844))
{
  New-WebBinding -name $webappName  -ip "*" -port 32844 -protocol "https"
}
 
# Bind SharePoint's own "SharePoint Services" certificate to the webbinding for HTTPS 32844
$b = Get-WebBinding -name $webappName -protocol "https" -port 32844
if ($b)
{
  $cert = get-childitem cert:\\localmachine\sharepoint | where { $_.subject -match "^CN=SharePoint Services" }
  if (!$cert)
  {
    throw "Cannot find `"SharePoint Services`" certificate in SharePoint certificate store"
  }
 
  [void]$b.AddSslCertificate($cert.ThumbPrint, "SharePoint")
}
else
{
  throw "Cannot find webbinding"
}
 
if (!(Get-WebBinding -name $webappName -protocol "http" -port 32843))
{
  New-WebBinding -name $webappName  -ip "*" -port 32843 -protocol "http"
}

Comments

Popular posts from this blog

How to Create an Auto-Incrementing Number Field in a SharePoint List

SharePoint Integration with IIS

Error:Installing product D:\exchangeserver.msi failed. Fatal error during installation. Error code is 1603.