2017-08-25 76 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'}