Set-IisAnonymousAuthentication

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

Syntax

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

Description

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

To disable anonymouse authentication, set the Disabled flag.

Parameters

Name Type Description Required? Pipeline Input Default Value
SiteName String The site where anonymous authentication should be set. true false
Path String The optional path where anonymous authentication should be set. false false
Disabled SwitchParameter Disable anonymous authentication. Otherwise, it is enabled. 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-IisAnonymousAuthentication -SiteName Peanuts

Turns on anonymous authentication for the Peanuts website.

EXAMPLE 2

Set-IisAnonymouseAuthentication -SiteName Peanuts Snoopy/DogHouse

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

EXAMPLE 3

Set-IisAnonymousAuthentication -SiteName Peanuts -Disabled

Turns off anonymous authentication for the Peanuts website.