Tests if IIS authentication types are enabled or disabled on a site and/or virtual directory under that site.
Test-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Anonymous [<CommonParameters>]
Test-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Basic [<CommonParameters>]
Test-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Digest [<CommonParameters>]
Test-IisSecurityAuthentication -SiteName <String> [-Path <String>] -Windows [<CommonParameters>]
You can check if anonymous, basic, or Windows authentication are enabled. There are switches for each authentication type.
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 | Tests if anonymous authentication is enabled. | true | false | |
Basic | SwitchParameter | Tests if basic authentication is enabled. | true | false | |
Digest | SwitchParameter | Tests if digest authentication is enabled. | true | false | |
Windows | SwitchParameter | Tests if Windows authentication is enabled. | true | false |
Test-IisSecurityAuthentication -SiteName Peanuts -Anonymous
Returns true
if anonymous authentication is enabled for the Peanuts
site. False
if it isn't.
Test-IisSecurityAuthentication -SiteName Peanuts -Path Doghouse -Basic
Returns true
if basic authentication is enabled forDoghouse
directory under the Peanuts
site. False
if it isn't.