加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows-server-2016 – 如何在Nano Server中添加SMTP服务器角色

发布时间:2020-12-13 23:31:07 所属栏目:Windows 来源:网络整理
导读:使用 this TechNet page上的信息,我已经成功建立了一个远程PowerShell会话,其中包含在Hyper-V VM中运行的2016 Preview 2 Nano Server. 我现在想要添加SMTP服务器角色.我期待这是一个微不足道的事情,因为我们了解Nano Server是Windows Server的未来,并将完成
使用 this TechNet page上的信息,我已经成功建立了一个远程PowerShell会话,其中包含在Hyper-V VM中运行的2016 Preview 2 Nano Server.

我现在想要添加SMTP服务器角色.我期待这是一个微不足道的事情,因为我们了解Nano Server是Windows Server的未来,并将完成我们从Windows Server习惯的一切,除了它是“无头”,即只能管理远程,通过WMI和PowerShell完成.

但是,似乎没有使用PowerShell cmdlet(如Add-WindowsFeature)以传统方式添加角色和功能,而是使用dism将包添加到VHD映像.好的,但只有大约五个包,不包括SMTP服务器.仅与Hyper-V,故障转移群集,网络和文件服务器角色有关.

我在远程PowerShell会话中尝试了Add-WindowsFeature等,但它无法识别任何常见的cmdlet名称.我怀疑这不仅仅是不存在的cmdlet.

也许这只是预发布Nano Server的限制?但我找不到任何相关的声明.

是否可以在Nano Server中添加SMTP服务器角色?

编辑:这是Get-WindowsFeature的输出:

PS C:UsersAdministratorDocuments> Get-WindowsFeature
Command 'Get-WindowsFeature' cannot be found.

……以及Get-Module:

PS C:UsersAdministratorDocuments> get-module -listavailable


    Directory: C:windowssystem32windowspowershellv1.0Modules


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)
现在是Nano Servers的早期阶段.我们现在所拥有的是早期预览,仅支持非常有限的功能. IIS和SMTP不在其中.

Get-WindowsFeature来自服务器管理器模块,该模块未在Nano上启用

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来启用某些功能,但这并没有多大帮助.

只要我们没有任何其他软件包,我们就无法向服务器添加更多功能.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读