Enables anonymous or basic authentication for an entire site or a sub-directory of that site.
Enable-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Anonymous [-WhatIf] [-Confirm] [<CommonParameters>]
Enable-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Basic [-WhatIf] [-Confirm] [<CommonParameters>]
Enable-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Windows [-WhatIf] [-Confirm] [<CommonParameters>]
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 Path
parameter.
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 | |
Anonymous | SwitchParameter | Enable anonymouse authentication. | true | false | |
Basic | SwitchParameter | Enable basic authentication. | true | false | |
Windows | SwitchParameter | Enable Windows authentication. | true | false | |
WhatIf | SwitchParameter | false | false | ||
Confirm | SwitchParameter | false | false | ||
CommonParameters | This cmdlet supports common parameters. For more information type Get-Help about_CommonParameters . |
Enable-IisSecurityAuthentication -SiteName Peanuts -Anonymous
Turns on anonymous authentication for the Peanuts
website.
Enable-IisSecurityAuthentication -SiteName Peanuts Snoopy/DogHouse -Basic
Turns on anonymous authentication for the Snoopy/DogHouse
directory under the Peanuts
website.