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

Tha*_* kp 3 .net windows security iis powershell

我是新来的powershell

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

这是我们如何从IIS手动执行此操作的屏幕截图。

在此处输入图片说明

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

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

不知道这是正确还是错误。

请帮忙。

Raf*_*Raf 5

编辑:此代码将为未指定的客户端值切换Access,因此在这方面是正确的。在没有-PSPath的情况下使用它,它将起作用

Set-WebConfigurationProperty /system.webserver/security/ipsecurity -Name allowUnlisted -Value "true" -Location "IIS:\Sites\123"
Run Code Online (Sandbox Code Playgroud)