2017-08-25 75 views
0

我想用Powershell从IIS7中删除“FTP授权规则”。如何从Powershell中的“FTP授权规则”中删除/删除规则?

想到我找到了“add-webconfiguration”Cmdlet,并且可以在“FTP授权规则”中成功添加新规则,但找不到任何方法来删除规则。

在get-help add-webconfiguration中,有一个对remove-webconfiguration的引用,但是此cmdlet不存在。 如果我尝试 “获取帮助删除-WebConfiguration”,系统将显示4项为以下但没有 “删除-WebConfiguration”:

删除,WebConfigurationBackup

删除,WebConfigurationLocation

删除,WebConfigurationLock

Remove-WebConfigurationProperty

剂量谁知道如何删除“FTP授权规则”中的指定规则?

回答

0

使用 “删除-WebConfigurationProperty” 可以成功删除规则


删除-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location 'FTP' 筛选器“system.ftpServer /安全/授权“ -名称 ”。” -AtElement @ {users =''; roles ='dyk'; permissions ='1'}