This command creates a new HTTPS binding of "*:443:" bindingInformation on a website named TestSite using an existing certificate which has a thumbprint of D043B153FCEFD5011B9C28E186A60B9F13103363 and
is placed at the Cert:\LocalMachine\Webhosting certificate store
Example 3: Create a new HTTPS binding and set it with Sni and CentralCertStore SSL flag settings
This powershell script example shows how to create a self-signed certificate on Personal store. Export the certificate to ROOT store to make the certificate considered as a trusted certificate
in the local machine and add a new HTTPS binding on a website named TestSite for testing purposes.
Parameters
-BindingInformation
Specifies the binding information string to use for the new site. The binding information of the form
IP:Port:hostname such as 192.168.0.1:80:www.contoso.com and one or more of the fields can be left blank, which
is equivalent to using a wildcard character such as *:443:. In this representation * indicates all IP
addresses and all hostnames are indicated by leaving the corresponding field blank.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-CertificateThumbPrint
Specifies a certificate thumbprint, which is used to add a new HTTPS binding.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
3
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-CertStoreLocation
Specifies the certificate store path of the certificate, which is used to add a new HTTPS binding.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.