Here are practical tasks using the netsh command in Windows to help beginners understand and apply its functionality:
Task: List all saved Wi-Fi profiles on your computer.
Command:
netsh wlan show profiles
Goal: View all saved Wi-Fi networks your computer has connected to, along with their profile names.
Task: View the configuration details of a specific Wi-Fi network.
Command:
netsh wlan show profile name=”WiFiName”
Goal: Understand the settings (e.g., security type, SSID) for a specific Wi-Fi network.
Task: Display the password of a saved Wi-Fi network.
Command:
netsh wlan show profile name=”WiFiName” key=clear
Goal: Access the Wi-Fi password for a network you previously connected to.
Task: Connect to a saved Wi-Fi profile using the command line.
Command:
netsh wlan connect name=”WiFiName”
Goal: Practice connecting to a specific Wi-Fi network without using the GUI.
Task: Disconnect from the current Wi-Fi network.
Command:
netsh wlan disconnect
Goal: Test disconnecting from a Wi-Fi network directly from the command line.
Task: Prevent your computer from automatically connecting to a specific Wi-Fi network.
Command:
netsh wlan set profileparameter name=”WiFiName” connectionmode=manual
Goal: Stop automatic connections to a network but keep the profile for future manual connections.
Task: View the current IP configuration of your network interface.
Command:
netsh interface ip show config
Goal: View details such as IP address, subnet mask, and gateway for your network interfaces.
Task: Set a static IP address and subnet mask on your network interface.
Command:
netsh interface ip set address name=”Ethernet” static 192.168.1.100 255.255.255.0
Goal: Manually configure the IP address of a network interface.
Task: Configure a static DNS server (e.g., Google’s DNS server 8.8.8.8) on your network interface.
Command:
netsh interface ip set dns name=”Ethernet” static 8.8.8.8
Goal: Change the DNS server for your network connection.
Task: Reset the TCP/IP stack to resolve potential network issues.
Command:
netsh int ip reset
Goal: Fix network issues by resetting the IP stack, restoring the system to its default configuration.
Task: Configure a network interface to automatically obtain an IP address from a DHCP server.
Command:
netsh interface ip set address name=”Ethernet” source=dhcp
Goal: Switch from a static IP address to dynamic IP assignment via DHCP.
Task: Display the current Windows Firewall settings and rules.
Command:
netsh advfirewall show allprofiles
Goal: Understand how the firewall is configured for different profiles (Domain, Private, Public).
Task: Enable or disable the Windows Firewall for all network profiles.
Command:
Enable:
netsh advfirewall set allprofiles state on
Disable:
netsh advfirewall set allprofiles state off
Goal: Practice enabling and disabling the firewall across all profiles.
Task: Create a new firewall rule to allow inbound traffic on a specific port (e.g., TCP port 8080).
Command:
netsh advfirewall firewall add rule name=”Allow8080” protocol=TCP dir=in localport=8080 action=allow
Goal: Learn how to create a firewall rule to allow incoming traffic on a specific port.
Task: Delete a firewall rule that allows traffic on a specific port (e.g., rule created above).
Command:
netsh advfirewall firewall delete rule name=”Allow8080”
Goal: Remove a custom firewall rule to prevent traffic on a specific port.
Task: Check the signal strength of your connected Wi-Fi network.
Command:
netsh wlan show interfaces
Goal: Monitor the signal quality and strength of your wireless network connection.
Task: Enable or disable a specific network interface on your machine.
Command:
Enable:
netsh interface set interface name=”Ethernet” admin=enabled
Disable:
netsh interface set interface name=”Ethernet” admin=disabled
Goal: Practice controlling the status of a network interface.
Task: Export the settings of a specific Wi-Fi network profile to an XML file.
Command:
netsh wlan export profile name=”WiFiName” folder=”C:\Users\YourName\Desktop”
Goal: Backup Wi-Fi profiles for use on another machine or as a configuration reference.
Task: Import a previously exported Wi-Fi network profile from an XML file.
Command:
netsh wlan add profile filename=”C:\Users\YourName\Desktop\WiFiName.xml”
Goal: Restore or transfer a Wi-Fi network profile from a backup XML file.
Task: Display the wireless adapter capabilities, including supported frequencies and modes.
Command:
netsh wlan show drivers
Goal: Learn about the technical capabilities and limitations of your wireless adapter.
Task: Prevent your computer from seeing or connecting to a specific Wi-Fi network.
Command:
netsh wlan add filter permission=block ssid=”BlockedNetwork” networktype=infrastructure
Goal: Block certain Wi-Fi networks from being automatically connected to.
Task: Clear the DNS resolver cache to force the system to fetch new DNS records.
Command:
netsh int ip reset netsh winsock reset ipconfig /flushdns
Goal: Troubleshoot issues caused by outdated or corrupted DNS information.
Task: Enable network discovery to allow your computer to find other devices on the network.
Command:
netsh advfirewall firewall set rule group=”Network Discovery” new enable=Yes
Goal: Turn on network discovery and make your device visible to other computers on the same network.
These tasks cover various networking functions using netsh, giving beginners hands-on experience with managing network profiles, firewall settings, IP configurations, and Wi-Fi networks.