Using the info on this TechNet page, I've successfully established a remote PowerShell session with a 2016 Preview 2 Nano Server running in a Hyper-V VM.

I now want to add the SMTP Server role. I was expecting this to be a trivial matter, as we are given to understand Nano Server is the future of Windows Server and will do everything we're used to from Windows Server, except that it's "headless", i.e., can only be managed remotely, which is done via WMI and PowerShell.

However, it seems roles and features aren't added in the traditional way, using PowerShell cmdlets such as Add-WindowsFeature, but rather by using dism to add Packages to the VHD image. Okay, but there are only about five Packages, which don't include SMTP Server. Only things to do with Hyper-V, Failover Clustering, Networking, and File Server role.

I did try Add-WindowsFeature and suchlike in the remote PowerShell session, but it didn't recognize any of the usual cmdlet names. I suspect this is more than just the cmdlets not being present.

Perhaps this is just a limitation of the pre-release Nano Server? But I couldn't find any statement to that effect.

Is it possible to add the SMTP Server role in Nano Server?

EDIT: here is the output from Get-WindowsFeature:

PS C:\Users\Administrator\Documents> Get-WindowsFeature
Command 'Get-WindowsFeature' cannot be found.

...and from Get-Module:

PS C:\Users\Administrator\Documents> get-module -listavailable

    Directory: C:\windows\system32\windowspowershell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest    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    EventTracingManagement              {New-EtwTraceSession, Get-EtwTraceSession, Set-EtwTraceSess...
Manifest    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Manifest    Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSS...
Manifest    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Net...
Manifest    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEventS...
Manifest    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol,...
Manifest    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart...
Manifest    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, Di...
Manifest    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShar...
Manifest    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...}
Manifest    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-...

  • It might be illuminating to run Get-WindowsFeature to see what is available. – Michael Hampton Aug 10 '15 at 18:33
  • @Michael, I've edited the question with some output. – Reg Edit Aug 10 '15 at 18:45

It is early days for Nano Servers. What we have right now is an early preview and only a very limited number of features is supported. IIS and SMTP are not among them.

Get-WindowsFeature is from the Server Manager module which is not enabled on Nano

dism.exe -online -get-features -format:table

you get something like:

------------------------------------- | --------
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

You can use Enable-WindowsOptionalFeature to enable some, but that doesn't really help.

As long as we don't have any additional packages we can not add more features to the server.

| improve this answer | |

nano server IS the future of Windows Server (for modern workloads) - it is not designed to replace all other modes, services and implementations.

I am sure more roles will appear as time goes by and as people request them BUT remember this is a Technical Preview and the nano server concept is brand new and under development.

Currently as others have said, the available roles are limited.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.