我正在运行一个全新的mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019,我尝试做的第一件事就是安装Print-Server,但出现了一个错误(这是我第一次使用powershell安装windows特性):
add-WindowsFeature -Name Print-Server
add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be found.
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. Error: 0x800f081f
At line:1 char:1
+ add-WindowsFeature -Name Print-Services -IncludeAllSubFeature
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand我尝试在容器内挂载我的主机WinSxS并使用sources文件夹,但是我得到了相同的错误。
Install-WindowsFeature -Name Print-Server -Source c:\sources我也尝试过在线使用Enable-WindowsOptionalFeature,但出现了以下错误:
PS C:\> Enable-WindowsOptionalFeature -Online -FeatureName Print-Server
Enable-WindowsOptionalFeature : Feature name Print-Server is unknown.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Print-Server
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
+ FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand看看其他问题,这部分看起来是为其他人工作的。我运行的是Windows10企业版2004。有人知道我能做什么吗?
发布于 2021-05-21 15:23:55
mcr.microsoft.com/windows映像应为目标基本映像。其他基于Windows容器的镜像(如Nano Server和Windows Server Core)不具有打印服务器角色。
https://stackoverflow.com/questions/64234710
复制相似问题