简体   繁体   中英

Can Set-WebBinding change the protocol from HTTP to HTTPS?

I can use Set-WebBinding to change the port of a given binding, but can I use it to change from http on port 80 to https on port 443 or vice versa?

I tried with this command but it fails because it doesn't recognize -PropertyName Protocol :

Set-WebBinding -Name 'Default Web Site' -BindingInformation '127.0.0.1:80:localhost'  -PropertyName Port -Value 443 -PropertyName Protocol -Value 'https'

Or should I use Remove-WebBinding and then New-WebBinding to make such a change?

我认为您将需要使用Remove-WebBinding删除现有的绑定,并使用New-WebBinding重新创建它,从而允许您提供协议,端口等。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM