is there any way to delete every urlacl reservation of a specific port.
I mean something like this is possible (customer constelation):
netsh http add urlacl url=http://localhost:55521/ user="everyone"
netsh http add urlacl url=http://+:55521/ user="everyone"
Now I would like to delete every reservation of port 55521, this could be any ip constelation!
By the way I am doing this in a c# application with a nancy self host.
to show the urls:
netsh http show urlacl
to delete a url:
netsh http delete urlacl url=http://localhost:55521/
Adding to the solution from 0x53olution, an easy way to get all acls in a list is running PowerShell:
netsh http show urlacl | Select-String -Pattern "55521"
I copied the output to a temporary file and deleted the Reserved URL :
part, then you can do:
Get-Content <temp-file>.txt | % {netsh http delete urlacl url=$_}
The saving to a temporary file part could be skipped with some -replace
action.
If you want to find more rules, you can use for example Select-String -Pattern "55521|55522|55523"
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With