使用此TechNet页面上的信息,我已成功build立了在Hyper-V虚拟机中运行的2016 Preview 2 Nano服务器的远程PowerShell会话。
我现在想要添加SMTP服务器angular色。 我期待这是一个微不足道的问题,因为我们已经了解到Nano Server是Windows Server的未来,并将完成我们从Windows Server中使用的一切,除了它是“无头的”,即只能pipe理远程,这是通过WMI和PowerShell完成的。
但是,似乎angular色和function不是以传统的方式添加的,使用Add-WindowsFeature等PowerShell cmdlet,而是使用dism将Packages添加到VHD映像。 好吧,但只有五个软件包,不包括SMTP服务器。 只有与Hyper-V,故障转移群集,networking和文件服务器angular色有关。
我在远程PowerShell会话中尝试了Add-WindowsFeature等类似的function,但是它没有识别任何常用的cmdlet名称。 我怀疑这不仅仅是小命令不存在。
也许这只是预发行版纳米服务器的限制? 但是我找不到这样的说法。
是否有可能在纳米服务器中添加SMTP服务器angular色?
编辑:这是Get-WindowsFeature的输出:
PS C:\Users\Administrator\Documents> Get-WindowsFeature Command 'Get-WindowsFeature' cannot be found.
…和Get-Module:
PS C:\Users\Administrator\Documents> get-module -listavailable Directory: C:\windows\system32\windowspowershell\v1.0\Modules ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, ... Manifest 1.0 Defender {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remo... Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Windows... Manifest 0.0 DnsClient Manifest 1.0.0.0 EventTracingManagement {New-EtwTraceSession, Get-EtwTraceSession, Set-EtwTraceSess... Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...} Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...} Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS... Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Net... Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEventS... Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol,... Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart... Manifest 1.0.0.0 PnpDevice {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, Di... Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShar... Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...} Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-... (end)
纳米服务器是早期的。 我们现在所拥有的是早期的预览,而且只支持非常有限的function。 IIS和SMTP不在其中。
Get-WindowsFeature来自Nano上未启用的Server Manager模块
dism.exe -online -get-features -format:table
你得到像这样的东西:
------------------------------------- | -------- Feature Name | State ------------------------------------- | -------- ServerManager-Core-RSAT | Disabled ServerManager-Core-RSAT-Role-Tools | Disabled ServerManager-Core-RSAT-Feature-Tools | Disabled FileAndStorage-Services | Enabled Storage-Services | Enabled File-Services | Enabled CoreFileServer | Enabled File-Services-Search-Service | Disabled Dedup-Core | Disabled SmbDirect | Enabled Microsoft-Hyper-V | Enabled FailoverCluster-NanoServer | Enabled SmbWitness | Disabled Storage-Replica | Disabled
你可以使用Enable-WindowsOptionalFeature来启用一些,但是这并没有什么帮助。
只要我们没有任何额外的软件包,我们不能添加更多的function到服务器。
纳米服务器是Windows服务器的未来(对于现代工作负载) – 它不是devise来取代所有其他模式,服务和实现。
我相信随着时间的推移,随着人们的要求,更多的angular色会出现,但是请记住,这是一个技术预览版,纳米服务器的概念是全新的,正在开发中。
目前正如其他人所说,可用的angular色是有限的。