What is netsh?

Feature and Practices with netsh | Find connected wifi password.
Feb 26, 2024
What is netsh?

Introduction

netsh is shorcut of Network Shell.
You can set up and administrate Network Interface, Firewall, WLAN(Wireless LAN), DHCP(Dynamic Host Configuration Protocol) and so on.

Topic

This article contains these topics.

  • Features of netsh

  • Practices of netsh

  • Conclusion

Features of netsh

netsh provides the following main features.

  1. Setting up and managing network interface
    Use netsh to change and manage the configuration of network interfaces, including IP addresses, subnet masks and default gateways.

  2. Setting up firewall
    Use netsh to configure and manage Windows Firewall's various security settings, including port forwarding and exception rele settings.

  3. WLAN configuration
    Use netsh to configure and manage settings related to wireless network, including creating, connecting and disconnecting profiles.

Prac 1 : Get Wi-Fi Name and Password.

  • Show all profile : netsh wlan show profile

  • Show specific profile : netsh wlan show profile "<PROFILE_NAME>" key=claer

  • Show shortest profile : netsh wlan show profile "<PROFILE_NAME>" key=clear | findstr /i /C:"SSID" /C:"키 콘텐츠"

Prac 2 : Get Network Interfaces

  • Show all network interface : netsh interface ipv4 show interfaces

    • Index(색인) : Unique Key

    • Metric(매트릭) : Priority Value in Routing Table for Network Interface

    • MTU : Maximum Transmission Unit in target network interface.

    • Status(상태) : connected/disconnected

    • Name(이름) : Name of network interface.

Conclusion

I used netsh to look up the WiFi password.
It took me about 3 minutes to write above scripts in Windows11/cmd.

I think you could write some fun and useful programs with netsh.

However, I don't recommend making network chages via netsh.
I recommend get data from network interfaces, IP and WiFi.
 

Share article
RSSPowered by inblog