How to Install DNS using PowerShell


Before we discuss how to install DNS using PowerShell, we must have an overall grasp of the concept of PowerShell and how it operates. PowerShell is a command-line interface powered by the automation engine developed by Microsoft Inc. (CLI is a text form of user interface that allows the admin to edit, change, and manage applications and files in a computer system). Its primary functions include building system configurations and software coding to perform administrative tasks in a device, better known as task automation.


In layman terms, a DNS or domain name system forms the IP address for every device visiting the internet to gain information or download/upload files. It aids in matching the name of the target website with the number and the address of the targeted website. This allows users to reach their desired websites. Without DNS, users would have to have memorized the IP address for the websites they are trying to reach.

Steps to Install DNS using PowerShell

Installing the DNS role using PowerShell is not a very complex task. However, it requires a basic understanding of Windows CMD.

  1. Setting a server name and static IP address: This can be done through Sconfig or server management.
  2. Open Command Prompt (cmd), choose ‘Run as Administrator :
    To open the command prompt, press:


    Select task manager, choose file option and ‘run new task’. You could also go to the start option and search for ‘RUN’ and search for ‘command prompt’.

  3. Enter ‘Powershell’.
    How to Install DNS using PowerShell
    After you do, you will see a screen such as the one shown above.
  4. Installing the new ‘DNS’ feature in your Windows CMD
    Insert Install-WindowsFeature -NameDNS- IncludeManagementTools and press enter.
    This will initiate the installation process for your DNS through PowerShell. When it is complete, you would see something like:
    DNS using PowerShell


  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.

    View all posts


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.