SkillPilotAI

netcfg

netcfg is a built-in Windows command (System32\netcfg.exe) that installs, uninstalls and queries network stack components (protocols, services, clients) and shows their bindings to adapters. Its -d switch resets every networking device, so it must never be run casually.

200.1 Why is it used?

  • Install or remove a protocol, service or client, e.g. reinstall File and Printer Sharing (MS_Server).
  • Check whether a component like MS_TCPIP6 is installed, and dump binding paths for support teams.
  • In Windows PE, -winpe brings up basic networking (TCP/IP, NetBIOS, Microsoft Client) during deployment.
  • Needs an elevated Command Prompt or PowerShell. Linux/macOS have no direct equivalent (different stack design).

200.2 How it works: components and bindings

Network stack: components and bindings
  1. 1.Client: Client for Microsoft Networks (MS_MSClient, class c)

  2. 2.Service: File and Printer Sharing (MS_Server, class s)

  3. 3.Client opens a file share; request goes down to the protocol

  4. 4.Protocol: TCP/IP (MS_TCPIP, class p)

  5. 5.Leaves through the Ethernet adapter (NIC)

  6. 6.Bindings = which component runs on top of which adapter; netcfg manages these

Class letterComponent typeExample ID
pProtocolMS_TCPIP, MS_TCPIP6
sServiceMS_Server (File and Printer Sharing)
cClientMS_MSClient (Client for Microsoft Networks)

200.3 Install components

  • On the office PC only netcfg -? was run: it prints help and changes nothing.
PowerShell
C:\Windows\System32\netcfg.exe -?
Output
    -c     provides the class of the component to be installed (p == Protocol,           s == Service, c == Client)    -i     provides the component ID    The arguments must be passed in the order shown.
Command Prompt
netcfg -l c:\oemdir\myprot.inf -c p -i myprotnetcfg -c s -i MS_Servernetcfg -v -winpe
OptionMeaning
-l <path.inf>full path of the INF file
-c p|s|cclass: protocol, service, client
-i <comp-id>component ID to install
-winpeWinPE: install TCP/IP, NetBIOS and Client together
-euse servicing environment variables
orderfixed: -l, then -c, then -i

200.4 Query, uninstall and show

Command Prompt
netcfg /q MS_IPXnetcfg /u MS_IPXnetcfg /s nnetcfg /b ms_tcpipnetcfg -v -m
Output
netcfg [-v] -b <comp-id>    netcfg -b ms_tcpip        Shows binding paths containing 'MS_TCPIP'netcfg [-v] -m        Outputs the binding map to NetworkBindingMap.txt in the current directory.        -v will also display the binding map to the console.
SwitchEffectRisk
-q <comp-id>is it installed?safe, read only
-s a / -s ninstalled adapters / all net componentsread only, but lists VPN, antivirus, filter driver names
-b <comp-id>binding paths of a componentread only
-m (-v -m)binding map to NetworkBindingMap.txt (and console)writes a file
-u <comp-id>uninstall the componentriskiest: wrong component breaks the network
  • Query/show switches were not run on the office PC (they reveal installed security/VPN software); the commands shown are Microsoft Learn examples.

200.5 Cleanup / reset: -d and -x

Output
netcfg -d        Performs a cleanup on all networking devices.        This will require a reboot.netcfg -x    netcfg -x        Performs a cleanup on networking devices, skipping those without physical        object names.        This will require a reboot.
What netcfg -d does
  1. 1.Run netcfg -d on a Windows PC

  2. 2.Cleanup on all networking devices: Ethernet, Wi-Fi, VPN adapters removed and reset

  3. 3.Static IPs, VPN adapters and saved settings are lost

  4. 4.Reboot required

  5. 5.Adapters are detected again only after reboot; reconfigure static IP and VPN

-x does the same but skips devices without a physical object name. Settings > Network reset is similar.

200.6 General options

  • -v: verbose output with any command.
  • -?: help (the only switch run in the video).
  • Microsoft Learn writes switches as /q, /u, /s; netcfg accepts both dash and slash forms.

200.7 When to use which

GoalUseAvoid
Is IPv6 installed?netcfg -q MS_TCPIP6netcfg -d
Support needs bindingsnetcfg -v -m-u guesses
Reinstall file sharingnetcfg -c s -i MS_Server (test machine first)-d
Network totally broken, nothing else worksnote static IP/VPN config, then netcfg -d + rebootrunning it remotely (cuts your own session)

200.8 Common mistakes

  • Using netcfg -d as a quick fix for a slow network: diagnose with ipconfig and ping first; reset is a last resort.
  • Running -d on a remote server: it cuts your own connection.
  • Not noting static IP and VPN settings before a reset.
  • Passing -l/-c/-i out of order.
  • Uninstalling the wrong component with -u.

200.9 Interview tips

  • netcfg installs, queries and uninstalls network components (protocol, service, client) and shows bindings.
  • Install order is fixed: -l INF, -c class (p/s/c), -i ID.
  • -q only reports; -u removes; -b/-m show bindings.
  • -d resets all networking devices and needs a reboot: last resort only.
  • -winpe brings up networking in Windows PE deployments.