- Windows 11 allows you to manage networks and WiFi both with commands (CMD and netsh) and from the graphical interface, covering everything from basic to advanced tasks.
- Tools such as ping, ipconfig, netstat, tracert, pathping, nslookup, or netsh are key to diagnosing, configuring, and automating the network.
- The system includes features to change IP, restart adapters, create WiFi access points, forget networks, limit data usage, and prioritize WiFi/LAN connections.
- With a good combination of commands, Network and Internet settings, and good security practices, you can have almost total control over connectivity in Windows 11.
If you're using Windows 11 for basic tasks, the graphical interface is probably more than enough to connect to Wi-Fi, browse the web, and little else. But when you want to diagnose network problems, optimize your Wi-Fi, or automate tasks , things change: that's where advanced networking tools and commands come in.
In Windows 11, you can manage virtually everything related to connectivity from the Command Prompt (CMD), PowerShell, and the Network & Internet settings panel . This includes checking your connection status, tracking your data packets, changing your IP address, restarting network interfaces, creating a Wi-Fi access point, and generating detailed network reports. Let's explore it all in detail, step by step.
What is CMD and why is it still key for networking in Windows 11?
CMD is the classic Windows command-line interface , a successor to the old MS-DOS. It allows you to run text commands to control almost any aspect of the system: files, processes, settings, and, of course, everything related to the network.
Although Windows 11 has a very user-friendly graphical interface, the command prompt (and PowerShell as well) remains essential for system administrators, technicians, developers, and advanced users , because many operations are performed faster, more accurately, and above all, more easily automated this way.
In addition to individual commands, CMD allows you to run batch scripts (.bat or .cmd) that chain together commands: moving files, changing settings, creating backups, or adjusting the network unattended. It's an extremely powerful tool, but also dangerous if you're not careful, because some commands can break the system or delete data if used incorrectly.
In the realm of networking, CMD and netsh offer a wealth of options for viewing IPs, checking connectivity, tracing routes, measuring latency, configuring Wi-Fi, adjusting the firewall, resetting TCP/IP, and generating comprehensive diagnostic reports. The learning curve is somewhat steeper , but once you've mastered the basic commands, management is far more efficient than navigating through menus.
Basic commands for diagnosing networks in Windows 11
The first step in working with networks in Windows 11 involves using a few essential commands to understand what's happening with your connection . These commands allow you to check for connectivity, your IP address, how a domain is resolved, and the routes your packets take.
ping: check if a device responds
The ping command is used to check if a host (IP or domain) is reachable and how long it takes for packets to travel to and from it. It's ideal for a first check when something isn't working properly with the network.
Basic usage to check if the local router is responding:
ping 192.168.1.1
Each execution sends 4 ICMP packets by default and returns round-trip times in milliseconds. If the destination responds successfully, you'll see messages like "Reply from XXXX" . If something goes wrong, you'll see warnings such as "Destination host unreachable" or "Request timed out".
Some useful ping parameters in Windows 11 are key for more refined connectivity testing :
ping 192.168.1.1 -n 100→ sends 100 packages instead of 4.ping 192.168.1.1 -w 3000→ Increases the maximum waiting time to 3000 ms.ping 192.168.1.1 -t→ keeps the ping indefinitely until you press Ctrl+C.
You can also ping domains, not just IPs. If pinging a domain returns a response , it means you have both connectivity and working DNS resolution.
ipconfig: View and control IP configuration
With ipconfig you can see at a glance the configuration of all network adapters: IP address, subnet mask, gateway, DNS, and more . It's one of the commands you'll use most often.
To see all the details, the typical thing to do is:
ipconfig /all
In addition to displaying information, ipconfig allows some basic maintenance actions that can save you when the Internet goes "dumb" due to a naming problem.
For example, to clear the Windows DNS cache you can run:
ipconfig /flushdns
This deletes the name records that the system has stored. It's very useful when there are domain resolution problems (for example, if you change the DNS or a site's IP address changes) and the computer is still using outdated information.
nslookup: inspect DNS resolution
The nslookup command is designed to provide detailed information about the relationship between domains and IP addresses . In other words, it allows you to directly query DNS servers to find the address associated with a hostname, or vice versa, to find the name associated with a specific IP address.
More direct use, in non-interactive mode:
nslookup www.ejemplo.com
You can also start it without arguments to enter interactive mode , where you run queries one after another, changing the record type, the DNS server, etc. It's a very powerful tool for diagnosing DNS problems when a domain resolves on one computer but not another, or when you suspect a failure on a specific server.
netstat: open connections and ports
The netstat command lists active connections and listening ports on your computer. It's very useful for seeing which programs are using a port and for checking for services that shouldn't be open.
For example, a common call is:
netstat -ano
With that combination, you can see the connections, the status (ESTABLISHED, LISTENING, etc.), the local/remote addresses, and the process ID (PID) . By cross-referencing that PID with the Task Manager, you can identify which application is behind each port.
tracert and pathping: knowing where your packets are going.
If you want to know which routers and hops traffic passes through to reach a destination, the command you're looking for is tracert . It displays each intermediate hop and its corresponding latency.
Simple example:
tracert www.ejemplo.com
You'll see a numbered list of hops, with three times per hop (three ICMP probes) and the IP address or name of each node. This is perfect for pinpointing where in the route latency spikes or traffic is lost.
If you need to go further, there's pathping , which combines what tracert does with a sort of extended ping to each hop to measure packet loss and stability route by route . The analysis takes a bit longer because it sends quite a few messages to each router, but the final summary clearly shows you which segment is experiencing traffic loss.
It is advisable to take certain precautions with pathping: do not overuse pings to avoid congestion, carefully check uppercase/lowercase values in parameters, and remember that it will only work if the device has TCP/IP installed on the adapter.
Advanced commands for managing networks and WiFi in Windows 11
Beyond the basics, Windows 11 includes a good number of commands designed to manage wired and wireless networks and the firewall in a fairly professional manner. This is where netsh, getmac, and similar commands come into play.
netsh: the all-rounder of network configuration
The netsh (Network Shell) command is essentially a network administration console within the Command Prompt (CMD). It operates using contexts (firewall, interface, WLAN, IP, etc.) and allows you to do almost everything: modify IP parameters, manage Wi-Fi profiles, adjust the firewall, run diagnostics, or export configurations to scripts. If needed, you can disable automatic network connections in Windows 11 from the graphical interface.
Typical examples focused on WiFi:
- View all saved wireless profiles:
netsh wlan show profiles - Display the data for a specific profile:
netsh wlan show profile "NombreRed" - Preventing a WiFi network from connecting automatically (manual mode):
netsh wlan set profileparameter name="NombreRed" connectionmode=manual - Return to automatic connection:
netsh wlan set profileparameter name="NombreRed" connectionmode=auto
With netsh you can also reset the TCP/IP stack, the firewall, Winsock , and other network components when everything starts failing for no apparent reason. A set of commonly used commands after a network reset would be:
netsh int tcp set global autotuninglevel=disablenetsh int ip resetnetsh advfirewall resetnetsh winsock resetipconfig /flushdnsipconfig /releaseipconfig /renew
Additionally, netsh allows you to change static IP addresses from the command prompt (CMD) . The typical flow would be:
- View interface configuration:
netsh int ipv4 show config - Assign IP address, subnet mask, and gateway to a specific interface:
netsh int ipv4 set address name="NombreInterfaz" static 10.0.0.5 255.255.255.0 10.0.0.1 - Configure DNS for that interface:
netsh int ipv4 set dns name="NombreInterfaz" static 10.0.0.1netsh int ipv4 add dns name="NombreInterfaz" 10.0.0.2 index=2
getmac: view the MAC addresses of your interfaces
The `getmac` command lets you quickly list the physical (MAC) addresses of all network interfaces, both connected and disconnected. This is useful for MAC filtering on a router, inventory control, or simply identifying network adapters.
It supports additional parameters, for example:
getmac /fo table→ displays the results in table format.getmac /nh→ hides column headers.
hostname, arp, nbtstat, net use and other useful network commands
There is a set of smaller but very practical commands for specific network management tasks in Windows 11:
- hostname: shows the name of the team on the network. Very useful when you need to locate a machine without knowing its IP address.
- arp: allows you to view and modify the ARP tablewhich links IPs to physical Ethernet addresses. With
arp -aYou can see the current entries. - nbtstat: displays statistics and tables of names of NetBIOS over TCP/IPIt helps diagnose name resolution problems on Windows local networks.
- net use: classic command for connect and disconnect shared resources (folders, printers) on a network. For example:
net use Z: \\servidor\carpeta /user:DOMINIO\usuario(more in) Credential manager) - taskkillThis allows you to terminate local or remote processes from the command line, useful when a network service hangs. For example:
taskkill /PID 1234 /F - shutdown: is used for shut down or restart remote equipmentprovided you have permissions:
shutdown /r /m \\equipo /t 0 - telnetA very old client for connecting to Telnet servers. In Windows 11 you need to First install the Telnet client from Optional Features if you want to use it.
Using Network and Internet settings in Windows 11
While commands are essential for many tasks, Windows 11 includes a very comprehensive Network & Internet Settings panel . From there, you can make most changes without using CMD, and it's often more convenient for everyday use.
To enter you can:
- Ir a Home > Configuration > Network and Internet.
- Or right-click on the network icon (Ethernet or WiFi) in the taskbar and choose Network and Internet Settings.
At the top you'll see the connection status (whether you have internet, network type, data usage, etc.). From there you can access Wi-Fi, Ethernet, VPN, data usage, airplane mode, and advanced settings.
View the IP address from the interface
If you don't want to use ipconfig, you can check your IPv4 address from the graphical configuration:
- Go to Settings> Network and Internet.
- Choose Wi-Fi (if you're using wireless) and then your connected network, or Ethernet if you use cable.
- In the block of Properties You will see the IP address next to "IPv4 Address".
Configure public or private network
The first time you connect to a network, Windows 11 marks it as public by default . You can switch between public and private from the network settings screen.
- Opens Settings> Network and Internet and select Wi-Fi or Ethernet, as appropriate.
- Click on the network you are connected to.
- En Network profile type, choose Public (recommended) o Private depending on whether you trust the network or not.
On public networks, the device hides from other devices to reduce risks. On private networks (your home, for example), the PC can share files and printers.
Change TCP/IP and DNS (including DNS over HTTPS)
If you need to change a static IP address or manually configure DNS, you can do so without using netsh:
- Go to Settings> Network and Internet.
- On Wi-Fi, enter Manage known networks and select the one you want; in Ethernet, tap on the connected network.
- Beside IP Assignment click on Edit.
- Choose between Automatic (DHCP) o ManualIn manual mode you can enter IP address, subnet mask, gateway, and DNS manually.
For DNS you can enable DNS over HTTPS (DoH) , either automatically or by specifying a manual template, and decide whether to allow back to plain text when the query cannot be encrypted.
Limit data and airplane mode
Windows 11 can help you control your data usage , especially if you use a 4G/5G dongle or share your mobile internet connection: you can also activate data saving mode to reduce background data consumption.
- Opens Settings> Network and Internet.
- On the connected network, enter Use of data.
- Press on Enter limit and defines the type of limit, period, and amount of data.
When you approach that limit, the system will warn you. And if you want to cut off all wireless communications at once, you can activate airplane mode from the quick panel or from Network & Internet > Airplane mode.
Fine-tuned WiFi control: auto-connection, profiles, and priorities
Windows 11 tends to automatically connect to saved Wi-Fi networks, which is convenient but sometimes impractical: you can end up right next to a repeater with a weak signal or connected to a poor-quality public network. It's a good idea to understand Wi-Fi profiles to decide which networks you connect to and which you don't.
Prevent Windows 11 from constantly searching for WiFi networks
On laptops, having Wi-Fi constantly scanning for networks can be risky if you connect to just anything, and it also drains the battery . One advanced technique involves changing the behavior of the WLAN automatic configuration service:
- Opens services.msc (Services) from Run (Win+R).
- Locate the service Automatic WLAN configuration.
- Right-click, then click on Stop and then go to Properties.
- Change the startup type of Automatic a Manual, apply and accept.
From that point on, Windows will not scan for Wi-Fi networks in the background until you reactivate the service or switch back to automatic startup. It's a fairly drastic change, intended for very specific scenarios.
Prevent it from automatically connecting to a specific network (from the GUI)
If you just want to stop your PC from connecting to a specific WiFi network , the easy way is:
- Go to Start > Settings > Network & Internet > Wi-Fi.
- Sign in Manage known networks.
- Find the problematic network, click on it, and then press on Stop remembering.
Doing this deletes the profile for that network (including the password) and it will no longer automatically reconnect. If you ever want to use it again, you'll have to enter the password.
Disable automatic WiFi connection from the Control Panel
Another more classic and granular way to prevent automatic connection to the current WiFi is:
- Opens Control Panel > Network and Internet > Network and Sharing Center.
- Click on Change adapter settings.
- Double-click on your active WiFi network and then tap on Wireless properties.
- In the Connection, uncheck Connect automatically when this network is within range.
From then on, that network will only connect when you do it manually , without affecting the rest of the saved profiles.
Manage WiFi auto-connection from CMD with netsh
If you prefer to do it from command line, you can use netsh to view and modify wireless profiles:
- View saved profiles:
netsh wlan show profiles - Configure a profile for manual connection:
netsh wlan set profileparameter name="NombreRed" connectionmode=manual - Return to automatic connection:
netsh wlan set profileparameter name="NombreRed" connectionmode=auto - Check the details of a profile and see if it is set to automatic or manual:
netsh wlan show profile "NombreRed"
The output of that last command will show you whether that WiFi is configured to "connect automatically" or "connect manually".
Prioritize Ethernet over WiFi and automatic disconnection
Often, you have a laptop that connects via both Wi-Fi and Ethernet. Ideally, when you plug in the Ethernet cable, you want that connection to take precedence , with Wi-Fi remaining in the background or even being disabled.
Disable WiFi when using LAN via group policy
In Pro/Enterprise editions you can use the Local Group Policy Editor (gpedit.msc) to change the behavior when there is a domain network:
- Press Win+R, type gpedit.msc and press Enter.
- Navigate to Computer Configuration > Administrative Templates > Network > Windows Connection Manager.
- Find the directive "Prohibit connections to non-domain networks when connected to a network with an authenticated domain".
- Open it, mark it as Enabled and apply the changes.
This option is intended for domain environments, but it reflects how WiFi versus LAN behavior can be automated at the policy level.
Change adapter priority from Device Manager
Another alternative is to take advantage of the adapter's advanced options (depending on the driver):
- Opens Device administrator (devmgmt.msc).
- Expand Network adapters and open the properties of your Ethernet card.
- Go to the tab Advanced and look for something like Priority and VLAN or similar.
- Activate it or adjust it as the controller allows.
In some drivers, this helps the system prioritize the wired connection over Wi-Fi when both are active. However, you can also disable Wi-Fi directly when connecting the cable if you prefer a more robust solution.
Enabling, disabling, and deleting WiFi networks in Windows 11
There are situations where you might want to completely disable your WiFi adapter , or clear saved networks that you no longer use and that could cause connection problems.
Disable the WiFi adapter from Settings
One way to "turn off" WiFi at the system level (as if you were unplugging the module) is:
- Ir a Home > Configuration > Network and Internet.
- OPEN Center network and sharing (in Advanced Network Settings or from Control Panel).
- Walk into Change adapter settings.
- Locate the wireless adapter, right-click and choose Deactivate.
In a few seconds, you'll see the Wi-Fi icon disappear and no more networks appear. When you want to get it back, return to the same point and select Activate.
Disable WiFi from Device Manager
Another way, somewhat more technical but equally valid, is:
- OPEN Device administrator.
- Ir a Network adapters.
- Right-click on your WiFi adapter and choose Disable device.
To restore wireless connectivity, simply re-enable the device . It's the same principle, just changing the entry point.
Disable WiFi using commands with netsh
If you prefer to do it without leaving CMD, you can use netsh to disable a specific network interface:
- Open CMD as administrator.
- Check the active WiFi interfaces:
netsh wlan show interfaces - Identify the interface name (for example, "Wi-Fi").
- Run:
netsh interface set interface name="Wi-Fi" admin=DISABLED
When you want to reactivate it, simply change DISABLED to ENABLED :
netsh interface set interface name="Wi-Fi" admin=ENABLED
Forget saved WiFi networks
Over time, you accumulate saved networks that you no longer need, which can cause failed connection attempts or conflicts . You can learn how to block or hide Wi-Fi networks and manage them graphically:
- Go to Start > Settings > Network & Internet > Wi-Fi.
- Press on Manage known networks.
- Locate the network you want to delete and click on Stop remembering.
Once forgotten, that network will not reconnect automatically . If you ever find yourself within its coverage area again, you will have to enter the password.
Create, share, and diagnose WiFi networks from Windows 11
Windows doesn't just connect to existing networks. It can also create Wi-Fi hotspots, share the connection, and generate detailed diagnostic reports about your wireless adapter's performance.
Create WiFi profiles manually
Sometimes you might want to create a Wi-Fi profile manually (for example, for a network that isn't broadcasting its SSID). In Windows 11, you can do this from two places: Modern Settings or the old Control Panel.
From Settings:
- Go to Settings > Network and Internet > Wi-Fi.
- Sign in Manage known networks.
- Press on Add a new network.
- Introduce network name, security type, password And if you want it to connect automatically.
From Control Panel:
- Opens Control Panel > Network and Internet > Network and Sharing Center.
- Click on Set up a new connection or network.
- Choose Manually connect to a wireless network.
- Fill in SSID, security, key, and connection behavior.
In both cases you are creating a complete WiFi profile that will be saved and ready to use as soon as the network is available.
Turn Windows 11 into a WiFi hotspot
If you need to share your PC's connection with other devices, you can turn it into a hotspot using netsh, provided the adapter supports it.
First, check if your card supports hosted networking:
netsh wlan show drivers
In the output, look for the "Hosted Network Supported" line and make sure it says Yes . If it says No, that adapter is not suitable for this use.
To create the access point:
- Open CMD as administrator.
- Define SSID and password for the shared network:
netsh wlan set hostednetwork mode=allow ssid=MiWifiCompartida key=ContraseñaFuerte123 - The hosted network starts up:
netsh wlan start hostednetwork
Next, you need to go to the properties of your Internet connection (for example, Ethernet), enter the Sharing tab and check "Allow users on other networks to connect through this computer's Internet connection" , selecting the hosted network interface as the destination.
Keep in mind that in recent versions of Windows, Microsoft has been replacing this functionality with the Mobile Hotspot option in Settings, which greatly simplifies the process.
Generate a detailed report of the WiFi adapter
When there are intermittent outages, strange drops, or problems that are difficult to reproduce, it's very useful to generate a WLAN report that summarizes events, sessions, and errors from the wireless adapter.
To create it:
- Open CMD as administrator.
- Run:
netsh wlan show wlanreport - Wait for it to finish; at the end it will indicate the report's path, usually something like:
C:\ProgramData\Microsoft\Windows\WlanReport\wlan-report-latest.html - Open that file in your browser.
The report includes a timeline graph showing connections and disconnections, power changes, periods with or without internet access, plus a series of sections with detailed information: system versions, adapters, output of commands such as ipconfig or netsh, WiFi profiles used, session statistics, and events with their error codes.
With that information you can detect failure patterns , check if the disconnections are due to a weak signal, power issues, authentication errors, or router outages.
Troubleshooting common WiFi problems in Windows 11
No matter how finely you configure your network, at some point you'll have to deal with connection errors, networks that disappear, passwords that aren't requested, or strange netsh codes. Knowing a few standard troubleshooting steps helps a lot.
WiFi adapter not detecting networks
When Windows 11 stops detecting Wi-Fi networks, it's usually due to corrupted drivers, disabled services, or corrupted system files . Some recommended actions are:
- Check in Device Manager > Network Adapters if WiFi appears and if there are warning icons.
- Disable and re-enable the adapter, or directly uninstall it and look for hardware upgrades.
- use option Reset network in Settings > Network & Internet > Advanced network settings > Reset network.
- After the reset, run the series of netsh and ipconfig commands discussed earlier and restart.
Errors 0x2 and 0x5 when generating the WLAN report
When using netsh wlan show wlanreport Sometimes errors appear such as 0 x 2 o 0 x 5 and the report isn't generated. Two tricks that usually fix it:
- Run before:
netsh wlan show networksnetsh wlan show interfaces
and then try the wlanreport again. - In the case of error 0x5, open CMD as administrator and run:
chkdsk C: /f
To check and correct disk errors, restart and try again.
Windows 11 does not ask for the WiFi password
Sometimes, when trying to connect to a network, the system doesn't even ask for the password or gets stuck trying. Some typical checks:
- Restart both the router like the equipment (actually turned off, waiting about 30 seconds on the router).
- Update WiFi adapter drivers from Device administrator.
- Disabling and enabling the adapter is a quick way to reset it.
- Forget the network from Manage known networks and reconnect by entering the password.
- Have a good time antivirus or an anti-malware scanner in case any harmful software is interfering. Also check how detect fake WiFi networks and protect your connection.
- As a last resort, use the Network reset to reset the entire network stack.
The WiFi keeps appearing and disappearing.
If you notice the SSID keeps dropping, or the connection drops randomly, it's usually a sign of poor coverage, interference, outdated drivers, or router problems . Some sensible troubleshooting steps include:
- Review the physical location from the router and try other bands or channels (especially at 2,4 GHz).
- Update both the router firmware such as WiFi drivers on the PC.
- Forget and recreate the WiFi profile, in case it has become corrupted.
- Use repeaters, powerline adapters, or mesh Wi-Fi systems when there are many walls or long distances. You can also limit bandwidth usage to prioritize traffic.
With all of the above, by combining commands such as ping, ipconfig, netsh, tracert, or pathping with the Network and Internet settings of Windows 11, it is possible to have a very complete command over the system's connectivity: you can detect problems, adjust WiFi and cable, change IP and DNS, prioritize interfaces, share your connection, clear saved networks, and generate advanced reports when needed, without depending on external tools and with a level of control that most users don't even suspect exists.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.