Is it possible to create SSLBinding without switching to IIS: \ SSLBindings

I am trying to create SSLBinding using powershell. I have a certificate in the certificate store and I continue as below

 $certificate = Get-ChildItem cert:\ -Recurse  | Where-Object {$_.FriendlyName -match $CertificateName } | Select-Object -First 1

cd IIS:\SslBindings

 Get-Item $certificate | New-Item 0.0.0.0!$Port

Is it possible to create an ssl binding without going to IIS: \ SslBindings?

Regards, Jeez

+3
source share
1 answer

Can you try in your context:

PS C:\>  new-item -path "IIS:\SslBindings\0.0.0.0!9004"  -Value $certificate

IP Address       Port Store            Sites
----------       ---- -----            -----
0.0.0.0          9004 My


PS C:\> dir IIS:\SslBindings

IP Address       Port Store            Sites
----------       ---- -----            -----
0.0.0.0          8172 MY
0.0.0.0          9000 My
0.0.0.0          9001 My
0.0.0.0          9002 My
0.0.0.0          9003 My
0.0.0.0          9004 My

Now I was oppressed for verification.

+3
source

All Articles