Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Unable to enable HTTPS binding for Website using Powershell

$
0
0

Hi,

I have been trying to enable HTTPS for a website in IIS, but I keep getting the following error:

New-Item : Failed to create SSL binding. Error code 1312.
At line:1 char:85
+ Get-Item cert:\LocalMachine\Root\0D53C58BBC8EEECDAB54D9ACEDF07EE7777F9B26 | New-Item <<<<  0.0.0.0!443
    + CategoryInfo          : InvalidData: (:) [New-Item], ProviderException
    + FullyQualifiedErrorId : Failed to create SSL binding. Error code 1312.,Microsoft.PowerShell.Commands.NewItemComm
   and

I am using the following set of PowerShell commands to enable HTTPS:

Import-Module WebAdministration
New-WebBinding -Name "WebSiteName" -IP "*" -Port 443 -Protocol https

And once HTTPS is enabled, I am using the following PowerShell to wire up the Certificate using its thumbprint:

Get-Item cert:\LocalMachine\Root\0D53C58BBC8EEECDAB54D9ACEDF07EE7777F9B26 | New-Item 0.0.0.0.!443

When doing via UI, it works fine. But using PowerShell gives the above mentioned error. Any idea why this is happening and how to solve this?


Admin QuikView Solution for CRM 2013


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>