removing isapifilter problemsRSS

6 replies

Last post Feb 04, 2016 08:45 AM by Blitzkrieg

  • removing isapifilter problems

    Aug 28, 2013 03:52 PM|michaele.james|LINK

    I am trying to remove a no longer used isapifilter with powershell.

    Here is what I am doing,  this removes it from the server level but does not remove the one loaded at the web site level. 

    Thank You anyone that can guide me.

    --------------------------------------

    Import-Module WebAdministration

    # remove millsecure if it is loaded

    $isapiFilterName = 'millsecure'

    $iispathFilter = 'iis:\'

    cd iis:\

    iisreset /stop

    if (Get-WebConfigurationProperty -filter //isapifilters -pspath $iispathFilter -name Collection[name="$isapiFilterName"]) {

         Remove-WebConfigurationProperty -filter //isapifilters -pspath $iispathFilter -name Collection[name="$isapiFilterName"] }

     

  • Re: removing isapifilter problems

    Aug 29, 2013 03:00 AM|ShayL|LINK

    Try this:

    Remove-WebConfigurationProperty -Filter system.webServer/isapiFilters -PSPath MACHINE/WEBROOT/APPHOST -Name . -AtElement @{name=$isapiFilterName} 

    -shay
  • Re: removing isapifilter problems

    Aug 29, 2013 11:35 AM|michaele.james|LINK

    Thank You for responding.

    No that did not work, and it actually gave me a Yellow warning.

    WARNING: Property . is not found on /system.webserver/isapiFilters at index @{name="millsecure"}

    ----additional information:

    If I use $iispathFilter = 'IIS\Sites\mill2013'   then it finds the filter with Get-WebConfigurationProperty -filter //isapifilters -pspath $iispathFilter -name Collection[name="$isapiFilterName"]

    but I get an error with :Remove-WebConfigurationProperty -filter //isapifilters -pspath $iispathFilter -name Collection[name="$isapiFilterName"]

    The error is :

    Remove-WebConfigurationProperty : Filename: Error: This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false". At line:1 char:32 + Remove-WebConfigurationProperty <<<<  -filter //isapifilters -pspath $iispath Filter -name Collection[name="$isapiFilterName"]     + CategoryInfo          : NotSpecified: (:) [Remove-WebConfigurationProper    ty], FileLoadException     + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.IIs.PowerS    hell.Provider.RemoveConfigurationPropertyCommand

     

     

     

  • Re: removing isapifilter problems

    Aug 29, 2013 01:14 PM|ShayL|LINK

    Are you sure that the 'millsecure' filter exists on the server level?

    -shay
  • Re: removing isapifilter problems

    Sep 04, 2013 02:38 AM|Angie xu - MSFT|LINK

    Hi michaele

    Remove an ISAPI filter when you no longer need the functionality that the filter provides,

    To remove an ISAPI filter, use the following syntax:

    appcmd set config /section:isapiFilters /-[name=' string ']

    The variable namestring is the name of the ISAPI filter that you want to remove. For example, to remove an ISAPI filter named ResponseFilter, type the following at the command prompt, and then press ENTER:

    appcmd set config /section:isapiFilters /-[name=' ResponseFilter ']

    Remove an ISAPI Filter (IIS 7) - http://technet.microsoft.com/en-us/library/cc771535(v=ws.10).aspx

    I think it will be good start to remove an ISAPI filter,

    Regards

    Angie xu

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: removing isapifilter problems

    Sep 04, 2013 03:10 PM|michaele.james|LINK

    I can successfully remove it at the server level.  What I am finding is that many of our clients also have it loaded at the WebSite level.  It is at that level that I am receiving an error trying to remove it.

  • Re: removing isapifilter problems

    Feb 04, 2016 08:45 AM|Blitzkrieg|LINK

    The following worked for me for removing an ISAPI filter from the default web site:

    Clear-WebConfiguration -PSPath MACHINE/WEBROOT/APPHOST -Filter "/system.webServer/isapiFilters/filter[@name='jakarta']" -Location "Default Web Site"