我是 powershell
的新手。
如何通过powershell
在IIS中更改ip地址和域限制
。
这是我们如何从 IIS 手动执行此操作的屏幕截图。
目前我正在使用此代码更改设置。
Set-WebConfigurationProperty/system.webserver/security/ipsecurity -Name allowUnlisted -Value "true"-Location "IIS:\Sites\123"-pspath IIS:\Sites\123
不知道这个对不对。
请帮忙。
最佳答案
编辑:此代码将切换未指定客户端的访问 值,因此在这方面是正确的。在没有 -PSPath 的情况下使用它,它会起作用
Set-WebConfigurationProperty /system.webserver/security/ipsecurity -Name allowUnlisted -Value "true" -Location "IIS:\Sites\123"
关于.net - 通过powershell在iis中限制IP地址和域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21821858/