25,004 views
10 votes
10 votes
What command can be used to install the dns package in a windows nano server image using powershell?

User Tharindu
by
2.7k points

1 Answer

21 votes
21 votes

Answer:

To install the DNS package in a Windows Nano Server image using PowerShell, you can use the following command:

Install-PackageProvider -Name NanoServerPackage -MinimumVersion 1.0.0.1 -Force

Install-Module -Name DNSClient,DnsServer -Force

The first command installs the NanoServerPackage provider, which is required to install packages on a Nano Server image. The second command installs the DNSClient and DnsServer modules, which provide the DNS functionality.

Keep in mind that the Nano Server image must have access to an online package repository in order to install these packages. If the image is not connected to the internet, you will need to specify an alternative package source using the -Source parameter.

For example:

Install-Module -Name DNSClient,DnsServer -Source \\server\share\NanoPackages\ -Force

This will install the DNS modules from the specified network share.

Step-by-step explanation:

User Saic Siquot
by
3.0k points