How to Use Ipconfig Command on Windows


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

Quick outline:

What is Ipconfig (Internet Protocol Configuration)

powershell ipconfig command


What is Ipconfig (Internet Protocol Configuration)?

Ipconfig is short for Internet Protocol Configuration. When executed without parameters it displays a list of network adapters, gateways, IPv4 and IPv6 protocol configurations. Its main purpose is to manage DHCP, DNS and IP addresses. It has many parameters and each parameter has its own importance in terms of retrieving the Internet Protocol configuration.

powershell ipconfig command

There is no such hard and fast rule for using the ipconfig command. There is a simple way to use it and that is to type them in PowerShell and execute them. However, information about when and how to use them can be obtained. Thus, the list of ipconfig commands along with their practical usage and information is given below.

1. ipconfig /all

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


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

2. ipconfig /displaydns

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


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

3. ipconfig /flushdns

The ipconfig /flushdns command clears the DNS resolver cache. This clears locally cached DNS records. Even though Windows clears cached DNS records automatically. But, this can be cleared manually with a single ipconfig /flushdns command.


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

4. ipconfig /registerdns

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


To update or register a computer's DNS servers, follow this command:

5. ipconfig/release

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


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

Comment: To release the currently specified IPv6 configuration for a DHCP server, use this command:

6. ipconfig /upgrade

The ipconfig /renew command renews the IPv4 address on the DHCP adapter. It renews IP addresses for all adapters when no adapters are specified in it. This command is usually executed after using the ipconfig/release cmdlet.


To renew a computer's IP address on the DHCP adapter, use this command:

Comment: To renew the IP address for version 6 adapter, observe the command below:

7. ipconfig/showclassid

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


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

8. ipconfig /setclassid

The ipconfig /setclassid command configures the DHCP class ID for the specified adapter. if asterisk

When the ipconfig /setclassid command is specified it configures the class ID for all available adapters.


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

9. ipconfig/?

ipconfig/? The command displays all available ipconfig commands and instructions for using them.


To get a list of ipconfig commands and supporting materials, use this command: 10.

ipconfig /all compartments

Ipconfig /allcompartments Displays information regarding all compartments. It retrieves the same information as the ipconfig command without parameters.


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

all boxes


The ipconfig command outputs the TCP/IP network configuration. It lists the network adapter, gateway, IPv4, and IPv6 protocol configurations. It manages DHCP, DNS and IP addresses. It has many other commands such as all, release, renew, flushdns, registereddns and displaydns. Each command has its own use when it comes to managing IP configuration.

Add comment

By Ranjan