简体   繁体   English

Set-WebBinding可以将协议从HTTP更改为HTTPS吗?

[英]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.

相关问题 使用 powershell 自动配置 SSRS 2016(需要将 URL 从“http”的“https”更改) - Automating Configuration of SSRS 2016 with powershell (Need to change URL from "https" of "http") 使用 Powershell 从 WebBinding 时如何获取网站名称? - How do I get the website name when from a WebBinding using Powershell? 从Powershell中的Get-WebBinding获取字符串格式的IIS IP地址 - Get an IIS IP address in string format from Get-WebBinding in Powershell 类似于IIS的get-webbinding:\\ Sites \\ $ variable - get-webbinding -like IIS:\Sites\$variable 为什么 Powershell 的 New-WebBinding commandlet 创建不正确的 HostHeader? - Why Powershell's New-WebBinding commandlet creates incorrect HostHeader? 如何使用Get-WebBinding选择没有主机头的绑定 - How to select binding with no host header using Get-WebBinding 带名称属性的Powershell New-WebBinding管道问题 - Powershell New-WebBinding Pipeline Issue with Name Property New-WebBinding:无法检索 cmdlet 的动态参数 - New-WebBinding: Cannot retrieve the dynamic parameters for the cmdlet 从https下载Powershell文件 - Powershell filedownload from https 无法建立HTTP或HTTPS远程会话 - Unable to establish an HTTP or HTTPS remoting session
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM