简体   繁体   English

通过Powershell在IIS中进行IP地址和域限制

[英]IP address and domain restrictions in iis through powershell

I am very new in powershell . 我在powershell是个新手。

How to change ip address and domain restrictions in IIS through powershell . 如何通过powershell更改IIS中的ip address and domain restrictions

Here is the screen shot how we can manualy do this from IIS. 这是我们如何从IIS手动执行此操作的屏幕截图。

在此处输入图片说明

Currently I am using this code to change the settings. 目前,我正在使用此代码更改设置。

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

Don't know this is correct or not. 不知道这是正确还是错误。

Please help. 请帮忙。

EDIT: This code will toggle Access for unspecified clients value so it is correct in that respect. 编辑:此代码将为未指定的客户端值切换Access,因此在这方面是正确的。 Use it without -PSPath and it will work 在不使用-PSPath的情况下使用它,它将起作用

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM