Sets a website's SSL certificate.


Set-IisWebsiteSslCertificate [-SiteName] <String> [-Thumbprint] <String> [-ApplicationID] <Guid> [-WhatIf] [-Confirm] [<CommonParameters>]


SSL won't work on a website if an SSL certificate hasn't been bound to all the IP addresses it's listening on. This function binds a certificate to all a website's IP addresses. Make sure you call this method after you create a website's bindings. Any previous SSL bindings on those IP addresses are deleted.

Beginning with Carbon 2.0.1, this function is available only if IIS is installed.


Name Type Description Required? Pipeline Input Default Value
SiteName String

The name of the website whose SSL certificate is being set.

true false
Thumbprint String

The thumbprint of the SSL certificate to use.

true false
ApplicationID Guid

A GUID that uniquely identifies this website. Create your own.

true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.


Set-IisWebsiteSslCertificate -SiteName Peanuts -Thumbprint 'a909502dd82ae41433e6f83886b00d4277a32a7b' -ApplicationID $PeanutsAppID

Binds the certificate whose thumbprint is a909502dd82ae41433e6f83886b00d4277a32a7b to the Peanuts website. It's a good idea to re-use the same GUID for each distinct application.