启用IIS可选功能IIS-ASPNET和IIS NetFx扩展性时出错



我无法启用可选功能IIS-ASPNET和IIS NetFxExtensibility。当我在powershell上运行以下命令以启用功能时

Enable-WindowsOptionalFeature -Online -FeatureName "IIS-NetFxExtensibility" -All
Enable-WindowsOptionalFeature -Online -FeatureName "IIS-ASPNET" -All

我得到以下错误

Enable-WindowsOptionalFeature : The source files could not be downloaded.
Use the "source" option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName "IIS-ASPNET" -All
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

您需要确保机器连接到网络,否则无法成功安装。或者下载新的批量许可介质。

您无法在Windows Server 2012 R2 中安装功能

方法1:连接到Internet­如果服务器可以连接到Windows Update进行功能安装,请让服务器进行连接。

方法2:使用Windows Server 2012 R2安装介质如果服务器无法连接到Windows Update,请下载新的批量许可介质(于2013年12月11日发布(,然后使用Install WindowsFeature PowerShell命令。

最新更新