In this part I will show you how you can add roles and feature (Packages) so this Nano server can accomplish its mission being an DNS, IIS etc.
This server is domain-joined so I can remote to it by typing
Enter-PSSession -ComputerName nanoserver1
You will notice that Powershell is a bit different in Nano server, example Get-WindowsFeature or Install-WindowsFeature is not working here. We have some special commands which we can use to add and install packages (roles and features)
First thing we have to do is to install PackageProvider which will allow us to Install Roles
- We can run this command to see all available Package Providers
Find-PackageProvider -Name *
- If you want to see more details about some package you can do it by typing, Find-PackageProvider -Name <PackageProviderName> |fl
- I will install NanoServerPackage packageprovider,
Install-PackageProvider -Name nanoserverpackage -MinimumVersion 1.0.1.0
- Next we need to save the module so that we can make use of it here on this machine
Save-Module -path “$env:programfiles\windowspowershell\modules” -name nanoserverpackage -MinimumVersion 1.0.1.0
Next we need to install this package provider module
Install-PackageProvider nanoserverpackage
- Next step is to import it
Import-PackageProvider nanoserverpackage
Let’s see what packages are available and what we can install.
Find-NanoServerPackage -Name *
Let’s see now how we can install and mange roles. I will install DNS-Package
Install-NanoServerPackage -Name microsoft-nanoserver-dns-package
Now when DNS is installed we need to enable additional features that are associates with DNS
Enable-WindowsOptionalFeature -online -featurename dns-server-full-role
If you would like to see all available cmdlets for DNS you will need to import module and then run Get-Command -Module DNSServer
You can connect to it from the DNS Manager as well
That’s it.
Cheers,
Nedim