Enable-IisSsl

Turns on and configures SSL for a website or part of a website.

Syntax

Enable-IisSsl -SiteName <String> [-VirtualPath <String>] [-RequireSsl] [-Require128BitSsl] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-IisSsl -SiteName <String> [-VirtualPath <String>] -RequireSsl [-Require128BitSsl] -RequireClientCertificates [-WhatIf] [-Confirm] [<CommonParameters>]

Enable-IisSsl -SiteName <String> [-VirtualPath <String>] [-RequireSsl] [-Require128BitSsl] [-AcceptClientCertificates] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

This function enables SSL and optionally the site/directory to:

By default, this function will enable SSL, make SSL connections optional, ignores client certificates, and not require 128-bit SSL.

Changing any SSL settings will do you no good if the website doesn't have an SSL binding or doesn't have an SSL certificate. The configuration will most likely succeed, but won't work in a browser. So sad.

Beginning with IIS 7.5, the Require128BitSsl parameter won't actually change the behavior of a website since there are no longer 128-bit crypto providers in versions of Windows running IIS 7.5.

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

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
SiteName String

The website whose SSL flags should be modifed.

true false
VirtualPath String

The path to the folder/virtual directory/application under the website whose SSL flags should be set.

false false
RequireSsl SwitchParameter

Should SSL be required?

false false False
Require128BitSsl SwitchParameter

Requires 128-bit SSL. Only changes IIS behavior in IIS 7.0.

false false False
AcceptClientCertificates SwitchParameter

Should client certificates be accepted?

false false False
RequireClientCertificates SwitchParameter

Should client certificates be required? Also requires SSL ('RequireSsl` switch).

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

EXAMPLE 1

Enable-IisSsl -Site Peanuts

Enables SSL on the Peanuts website's, making makes SSL connections optional, ignoring client certificates, and making 128-bit SSL optional.

EXAMPLE 2

Enable-IisSsl -Site Peanuts -VirtualPath Snoopy/DogHouse -RequireSsl

Configures the /Snoopy/DogHouse directory in the Peanuts site to require SSL. It also turns off any client certificate settings and makes 128-bit SSL optional.

EXAMPLE 3

Enable-IisSsl -Site Peanuts -AcceptClientCertificates

Enables SSL on the Peanuts website and configures it to accept client certificates, makes SSL optional, and makes 128-bit SSL optional.

EXAMPLE 4

Enable-IisSsl -Site Peanuts -RequireSsl -RequireClientCertificates

Enables SSL on the Peanuts website and configures it to require SSL and client certificates. You can't require client certificates without also requiring SSL.

EXAMPLE 5

Enable-IisSsl -Site Peanuts -Require128BitSsl

Enables SSL on the Peanuts website and require 128-bit SSL. Also, makes SSL connections optional and ignores client certificates.