Set-IisWindowsAuthentication

Enables or disables Windows authentication for all or part of a website.

Syntax

Set-IisWindowsAuthentication [-SiteName] <String> [[-Path] <String>] [-Disabled] [-UseKernelMode] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

By default, enables Windows authentication on a website. You can enable Windows authentication at a specific path under a website by passing the virtual path (not the physical path) to that directory.

To disable Windows authentication, set the Disabled flag.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
SiteName String The site where Windows authentication should be set. true false
Path String The optional path where Windows authentication should be set. false false
Disabled SwitchParameter Disable Windows authentication. Otherwise, it is enabled. false false
UseKernelMode SwitchParameter Turn on kernel mode. Default is false. More information about Kerndel Mode authentication. 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

Set-IisWindowsAuthentication -SiteName Peanuts

Turns on Windows authentication for the Peanuts website.

EXAMPLE 2

Set-IisWindowsAuthentication -SiteName Peanuts Snoopy/DogHouse

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

EXAMPLE 3

Set-IisWindowsAuthentication -SiteName Peanuts -Disabled

Turns off Windows authentication for the Peanuts website.

EXAMPLE 4

Set-IisWindowsAuthentication -SiteName Peanuts -UseKernelMode

Turns on Windows authentication for the Peanuts website.