Windows Nano Server是客户端SKU吗?

我一直在试验在Windows Server 2016 Nano(TP 5)上运行Powershell DSC。 当我运行configuration时,出现以下错误:

PowerShell DSC资源MSFT_xWindowsFeature未能执行Test-TargetResourcefunction,并显示以下错误消息:使用PowerShell安装angular色和function所需状态configuration仅在服务器SKU上受支持。 客户端SKU不支持此function。

当然,纳米是一个服务器SKU,对不对?

如果你有兴趣,这里是我使用的DSCconfiguration(虽然我不得不解决一个问题,请参阅https://github.com/PowerShell/xPSDesiredStateConfiguration/pull/258 ):

Configuration Webserver { Import-DscResource -ModuleName xPSDesiredStateConfiguration Node "172.28.128.9" { Log MyMessage { Message = "This installs IIS" } xWindowsFeature "Webserver" { Name = "Web-Server" Ensure = "Present" IncludeAllSubFeature = $TRUE } } } 

MSFT_xWindowsFeature.psm1中的Test-TargetResource函数尝试导入服务器pipe理器PS模块(在nano服务器中不可用),如果失败则引发该exception:

  try { Import-Module -Name 'ServerManager' -ErrorAction Stop } catch [System.Management.Automation.RuntimeException] { if ($_.Exception.Message -like "*Some or all identity references could not be translated*") { Write-Verbose $_.Exception.Message } else { Write-Verbose -Message $script:localizedData.ServerManagerModuleNotFoundMessage New-InvalidOperationException -Message $script:localizedData.SkuNotSupported } } catch { Write-Verbose -Message $script:localizedData.ServerManagerModuleNotFoundMessage New-InvalidOperationException -Message $script:localizedData.SkuNotSupported } 

该错误消息的文本对于作为客户端SKU的服务器不一定是准确的,并且在MSFT_xWindowsFeature.strings.psd1中定义:

 SkuNotSupported = Installing roles and features using PowerShell Desired State Configuration is supported only on Server SKU's. It is not supported on Client SKU.