How to Use the Ipconfig Commands on Windows

PowerShell is a powerful CLI Windows management tool. It has tons of commands that are used for network management. One such command is ipconfig.

Quick Outline:

What is Ipconfig (Internet Protocol Configuration)

PowerShell Ipconfig Commands


What is Ipconfig (Internet Protocol Configuration)?

The Ipconfig is the acronym of the Internet Protocol Configuration. It displays the list of network adapters, gateways, IPv4, and IPv6 protocol configurations when executed without parameters. Its core purpose is to manage the DHCP, DNS, and IP addresses. It has several parameters and each parameter has its significance in terms of retrieving internet protocol configuration.

PowerShell Ipconfig Commands

There is no such hard rule to use the ipconfig commands. There is a simple way to use it and that is to type and execute them in PowerShell. However, information can be learned as to when and how to use them. Thus, the list of ipconfig commands along with their practical usage and information is provided below.

1. ipconfig /all

The ipconfig /all command gets all IP configurations. It lists all the network adapters including wireless networks and wired LAN networks. It displays the configuration of each adapter connected. Network configuration includes the details of media state, physical address, or DHCP status.


The ipconfig /all command gets the configuration of the TCP/IP adapters:

ipconfig /all

2. ipconfig /displaydns

The ipconfig /displaydns command gets DNS resolver caches content. It displays all the cached DNS records with complete details, including record name, type, TTL, data length, section, and CNAME record.


To get the cached DNS details, execute the given command in the PowerShell console:

ipconfig /displaydns

3. ipconfig /flushdns

The ipconfig /flushdns command purges the DNS resolver cache. It clears the locally cached DNS records. Even though Windows does clear the cached DNS records automatically. But, it can be cleared manually with a single ipconfig /flushdns command.


To clear the cached DNS records manually, type and run this command:

ipconfig /flushdns

4. ipconfig /registerdns

The ipconfig /registerdns command creates or registers a DNS server. It does so by using the hostname and IP address of the computer on which the command is being executed. It informs the DNS server to register or update the DNS records for the current computer.


To update or register the DNS server of the computer, overview this command:

ipconfig /registerdns

5. ipconfig /release

The ipconfig /release command releases the currently assigned IP address to a computer.


To release the IP address assigned to a computer, execute this command:

ipconfig /release

Note: To release currently assigned IPv6 configurations for the DHCP server, use this command:

ipconfig /release6

6. ipconfig /renew

The ipconfig /renew command renews the IPv4 address on the DHCP adapters. It renews the IP address for all adapters when any of the adapters is not specified to it. This command is usually executed after the use of the ipconfig /release cmdlet.


To renew the computer’s IP address on the DHCP adapters, use this command:

ipconfig /renew

Note: To renew the IP address for version 6 adapters, overview the below command:

ipconfig /renew6

7. ipconfig /showclassid

The ipconfig /showclassid command gets the DHCP class ID for an adapter.


To get the DHCP class ID for all the adapters, use this command:

ipconfig /showclassid *

8. ipconfig /setclassid

The Ipconfig /setclassid command configures the DHCP class ID for the specified adapter. If the asterisk (*) is specified to the Ipconfig /setclassid command then it configures the class ID for all the available adapters.


This command will set the DHCP class ID for all the adapters:

ipconfig /setclassid *

9. ipconfig /?

The ipconfig /? command displays all the available ipconfig commands and instructions to use them.


To get the list of ipconfig commands and helping material, use this command:

ipconfig /?

10. ipconfig /allcompartments

The ipconfig /allcompartments displays the information regarding all compartments. It retrieves the same information as the ipconfig command does without parameters.


To get all the ipconfig compartments and their information, execute this command:

ipconfig /allcompartments


The ipconfig command outputs TCP/IP network configurations. It lists down network adapters, gateways, IPv4, and IPv6 protocol configurations. It manages the DHCP, DNS, and IP addresses. It has several other commands such as all, release, renew, flushdns, registerdns, and displaydns. Each command has its use when it comes to managing the IP configurations.

About the author

Muhammad Farhan

I am a Computer Science graduate and now a technical writer who loves to provide the easiest solutions to the most difficult problems related to Windows, Linux, and Web designing. My love for Computer Science emerges every day because of its ease in our everyday life.