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?