How could I remove/delete the rules from “FTP Authorization Rules” in Powershell? RRS feed

  • Question

  • I am trying to use Powershell to delete the "FTP Authorization Rules" from IIS7.

    Thought I found the "add-webconfiguration" Cmdlet and can add a new rule in "FTP Authorization Rules" successfully, but can't find any way to delete the rules.

    In the get-help add-webconfiguration, there is a reference to remove-webconfiguration, but this cmdlet does not exist. If I try "get-help Remove-WebConfiguration", system will show 4 item as following but NO "Remove-WebConfiguration":





    Dose anyone know how to remove the specified rule in "FTP Authorization Rules"?

    Monday, August 28, 2017 3:42 AM


  • Use "Remove-WebConfigurationProperty" can success to delete the rules

    Example as following:

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

    • Marked as answer by lernshin Tuesday, August 29, 2017 4:16 AM
    • Edited by lernshin Tuesday, August 29, 2017 6:15 AM
    Tuesday, August 29, 2017 4:15 AM

All replies