Disables anonymous or basic authentication for all or part of a website.
Disable-IisSecurityAuthentication -SiteName <String> [-VirtualPath <String>] -Anonymous [-WhatIf] [-Confirm] [<CommonParameters>]
Disable-IisSecurityAuthentication -SiteName <String> [-VirtualPath <String>] -Basic [-WhatIf] [-Confirm] [<CommonParameters>]
Disable-IisSecurityAuthentication -SiteName <String> [-VirtualPath <String>] -Windows [-WhatIf] [-Confirm] [<CommonParameters>]
By default, disables an authentication type for an entire website. You can disable 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.
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 . |
Disable-IisSecurityAuthentication -SiteName Peanuts -Anonymous
Turns off anonymous authentication for the Peanuts
website.
Disable-IisSecurityAuthentication -SiteName Peanuts Snoopy/DogHouse -Basic
Turns off basic authentication for the Snoopy/DogHouse
directory under the Peanuts
website.