通过PowerShell在iis中的IP地址和域限制

时间:2014-02-17 06:02:19

标签: .net windows security iis powershell

我是powershell的新人。

如何通过ip address and domain restrictions更改IIS中的powershell

以下是我们如何从IIS手动完成此操作的屏幕截图。

enter image description here

目前我正在使用此代码更改设置。

Set-WebConfigurationProperty /system.webserver/security/ipsecurity -Name allowUnlisted -Value "true" -Location "IIS:\Sites\123" -pspath IIS:\Sites\123

不知道这是否正确。

请帮忙。

1 个答案:

答案 0 :(得分:4)

编辑:此代码将切换 Access for unspecified clients 值,因此在这方面它是正确的。使用它而不使用-PSPath,它将起作用

Set-WebConfigurationProperty /system.webserver/security/ipsecurity -Name allowUnlisted -Value "true" -Location "IIS:\Sites\123"