In a process of version upgrade, our current solution takes all bindings (except for two dummy urls) from one site and setting them on another site.
I'm currently removing the bindings through PowerShell but it is super slow. I've looked on about every thread in SO and almost every solution uses "Remove-WebBinding".
This is my current code:
Get-Website -Name $siteName | Get-WebBinding | Where-Object { $_.HostHeader -notlike '*dummy*' } | Remove-WebBinding;
I have 272 (-2 dummy) bindings to remove and it takes more about 3 minutes.
Any ideas how to do it faster?
BTW: Adding all of those bindings one by one is super-slow too, but I guess if I'll find an answer here a similar solution would do for adding as well.