Enable-IisSecurityAuthentication

Enables anonymous or basic authentication for an entire site or a sub-directory of that site.

Syntax

Enable-IisSecurityAuthentication -SiteName <String> [-VirtualPath <String>] -Anonymous [-WhatIf] [-Confirm] [<CommonParameters>]
Enable-IisSecurityAuthentication -SiteName <String> [-VirtualPath <String>] -Basic [-WhatIf] [-Confirm] [<CommonParameters>]
Enable-IisSecurityAuthentication -SiteName <String> [-VirtualPath <String>] -Windows [-WhatIf] [-Confirm] [<CommonParameters>]

Description

By default, enables an authentication type on an entire website. You can enable an authentication type at a specific path under a website by passing the virtual path (not the physical path) to that directory as the value of the VirtualPath parameter.

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 site where anonymous authentication should be set.

true false
VirtualPath String

The optional path where anonymous authentication should be set.

false false
Anonymous SwitchParameter

Enable anonymouse authentication.

true false False
Basic SwitchParameter

Enable basic authentication.

true false False
Windows SwitchParameter

Enable Windows authentication.

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-IisSecurityAuthentication -SiteName Peanuts -Anonymous

Turns on anonymous authentication for the Peanuts website.

EXAMPLE 2

Enable-IisSecurityAuthentication -SiteName Peanuts Snoopy/DogHouse -Basic

Turns on anonymous authentication for the Snoopy/DogHouse directory under the Peanuts website.