通过Powershell从IP和域限制中删除IP [英] Remove Ip From Ip and domain restriction through powershell

查看:203
本文介绍了通过Powershell从IP和域限制中删除IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够通过powershell在IIS IP和域限制列表中添加IP,但是无法从那里删除IP.

I am able to add IP in the IIS IP and domain restriction list through powershell, but cant able to remove the IP from there.

示例:

add-WebConfiguration/system.webserver/security/ipsecurity-位置"iis:\ default网站"-值@ {ipaddress ="192.168.1.1"; allowed ="true"}

add-WebConfiguration /system.webserver/security/ipsecurity -Location "iis:\default web site" -Value @{ipaddress="192.168.1.1";allowed="true"}

如何通过powershell从那里删除相同的IP

How can I remove the same ip from there through powershell

推荐答案

我需要同样的东西,并且可以正常工作:

I needed the same and this is working:

Remove-WebConfigurationProperty /system.webServer/security/ipSecurity -location "iis:\default web site" -Name "." -AtElement @{ipAddress="192.168.1.1";allowed="true"} -PSPath IIS:\

这篇关于通过Powershell从IP和域限制中删除IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆