Enables or disables anonymous authentication for all or part of a website.
Set-IisAnonymousAuthentication [-SiteName] <String> [[-Path] <String>] [-Disabled] [-WhatIf] [-Confirm] [<CommonParameters>]
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.
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 . |
Set-IisAnonymousAuthentication -SiteName Peanuts
Turns on anonymous authentication for the Peanuts
website.
Set-IisAnonymouseAuthentication -SiteName Peanuts Snoopy/DogHouse
Turns on anonymous authentication for the Snoopy/DogHouse
directory under the Peanuts
website.
Set-IisAnonymousAuthentication -SiteName Peanuts -Disabled
Turns off anonymous authentication for the Peanuts
website.