I have several websites on an IIS server all listening on port 8080, and all with the same certificate in use (a generic * one for testing purposes).
When I run Get-ChildItem IIS:\\SslBindings
I'm presented with:
IP Address Port Host Name Store Sites ---------- ---- --------- ----- ----- 0.0.0.0 8080 MY Site1 Site2 Site3
If I do
Get-ChildItem IIS:\SSLBindings | ? { $_.Sites -eq Site1 }
I get exactly the same result.
Is there a method that tells me JUST what certificate Site1 is using? Maybe a Get-ItemProperty
thing? I'm using:
(Get-ItemProperty -Filter "/system.applicationHost/sites/site[@name='Site1']/bindings" -Name "Collection").bindingInformation
to get port information, but can't seem to figure out what the thumbprint ID of the certificate assigned to this one site is.
感谢Lex Li的评论和坐在我旁边的一双新眼睛,能够弄明白。
( ( Get-ItemProperty -Filter"/system.applicationHost/sites/site[@name='Site1']/Bindings" -name Collection ).CertificateHash )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.