Forum Discussion
danielgreen77
Feb 21, 2024Copper Contributor
Managing IIS site bindings with Powershell
I have a DevOps release pipeline that I want to use to automatically control IIS site bindings.
However the Remove-IISSiteBinding cmdlet does not have the -Force parameter, so it's not possible to run that command in a non-interactive script.
The reason I need to use that cmdlet is because the IIS Web App Manage task fails when there is an existing SSL certificate binding on the site.
https://github.com/microsoft/azure-pipelines-extensions/issues/1008
https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/IISWebAppManagementOnMachineGroupV0
So an additional step is needed to remove the binding first.
As a fallback I can use "netsh http delete sslcert", but the cmdlet would be preferred.
Has anyone else been tripped up by this?
No RepliesBe the first to reply