[英]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? 我可以使用Set-WebBinding更改给定绑定的端口,但可以使用它从端口80上的http更改为端口443上的https或反之吗?
I tried with this command but it fails because it doesn't recognize -PropertyName Protocol
: 我尝试使用此命令,但由于无法识别-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
进行此类更改?
我认为您将需要使用Remove-WebBinding
删除现有的绑定,并使用New-WebBinding
重新创建它,从而允许您提供协议,端口等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.