【问题标题】:How could I remove/delete the rules from "FTP Authorization Rules" in Powershell?如何从 Powershell 的“FTP 授权规则”中删除/删除规则?
【发布时间】:2017-08-25 09:18:53
【问题描述】:

我正在尝试使用 Powershell 从 IIS7 中删除“FTP 授权规则”。

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

在get-help add-webconfiguration中,有remove-webconfiguration的引用,但是这个cmdlet不存在。 如果我尝试“get-help Remove-WebConfiguration”,系统将显示以下 4 项但没有“Remove-WebConfiguration”:

删除-WebConfigurationBackup

删除-WebConfigurationLocation

移除-WebConfigurationLock

删除-WebConfigurationProperty

有人知道如何删除“FTP授权规则”中的指定规则吗?

【问题讨论】:

    标签: powershell iis ftp iis-7 authorization


    【解决方案1】:

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


    删除-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -location 'FTP' -filter "system.ftpServer/security/authorization" -name "." -AtElement @{users='';roles='dyk';permissions='1'}

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-30
      • 1970-01-01
      • 2013-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多