PowerShell Snap-in: Configuring SSL with the IIS PowerShell Snap-in
Article
by IIS Team
To enable SSL three steps are involved:
Acquiring and installing a certificate
Creating an SSL binding in IIS
Assigning the certificate to the IP:Port of the IIS binding
and optionally:
Enforcing SSL on your web-site
Acquiring and Installing a Certificate
Acquiring certificates is a tricky business. The users of your web-site have to trust the certificate and that's why you have to get it from a trusted Certificate Authority. For testing purposes you can make your own certificate however. For this walkthrough we will use a so-called self-signed certificate. The tool that helps us creating a self-signed certificate is called MAKECERT and is part of the Visual Studio SDK Tools. The following MAKECERT command will create a self-signed certificate and automatically install it in the "my" Windows Certificate Store:
The previous command generated the following SSL Binding:
IP Address Port Store Sites
---------- ---- ----- -----
0.0.0.0 443 My Default Web Site
SSL is ready to go now and you can browse to your site by entering https://localhost.
Summary
It is fairly straightforward process to set up SSL with PowerShell. You need to get a certificate, create an SSL binding in IIS and then use the IP and Port of the IIS binding to create a SSL binding in HTTP.SYS.
This module covers cmdlets that are used to configure settings related to Group Policy, Server Manager, Hyper-V, and Internet Information Services (IIS).
As an Information Security Administrator, you plan and implement information security of sensitive data by using Microsoft Purview and related services. You’re responsible for mitigating risks by protecting data inside collaboration environments that are managed by Microsoft 365 from internal and external threats and protecting data used by AI services. You also implement information protection, data loss prevention, retention, insider risk management, and manage information security alerts and activities.