问题现象

Windows server 2012安装IIS如果遇到错误,还可以使用powershell进行安装,比图形化安装更为高效,尤其是在图形化界面安装遇到错误时,不妨使用powershell试试。

解决方案

1、登录服务器即可看到左下角的存在3个图标。第二个即为powershell,点击打开,打开之后如下图。

ECS Windows Server2012使用powershell安装IIS

2、输入get-windowsfeature web* 查看已经安装过的IIS 功能(IIS的安装包全部以web开头的),结果如下(没有安装任何功能,安装过的前面[ ]会有X)。

ECS Windows Server2012使用powershell安装IIS

3、安装Web-Server,就是IIS 服务了。

install-windowsfeature web-server 

ECS Windows Server2012使用powershell安装IIS

ECS Windows Server2012使用powershell安装IIS

安装后会如果提示 Success 就是安装成功了;看一下安装了哪些功能 前面有 X 的就表示已经安装了。

ECS Windows Server2012使用powershell安装IIS

4、安装asp .NET3.5 .NET4.5

install-windowsfeature web-asp,web-asp-net,web-asp-net45

ECS Windows Server2012使用powershell安装IIS

5、到这里还少安装了管理控制台。再继续安装管理控制台。

install-windowsfeature web-mgmt-console

6、如果已经安装完了 。发现缺了功能还可以再单独安装。

install-windowsfeature  Web-IP-Security

ECS Windows Server2012使用powershell安装IIS

//转载:https://help.aliyun.com/knowledge_detail/40959.html?spm=5176.11065259.1996646101.searchclickresult.43585f607zc7De

相关文章:

  • 2022-02-04
  • 2021-04-17
  • 2021-07-17
  • 2022-12-23
  • 2021-04-15
  • 2021-06-07
猜你喜欢
  • 2021-06-03
  • 2021-09-04
  • 2021-12-04
  • 2019-08-12
  • 2021-08-15
  • 2021-11-29
  • 2021-11-29
相关资源
相似解决方案