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"] }