Reset Network Card and Firewall settings
Start from elevated prompt
Reset firewall and NIC configuration states with netsh
Export current active policy of Windows Firewall to a specified file.
netsh advfirewall export %temp%\advfirewall.wfw
Restore the Windows Firewall with Advanced Security policy to the default policy. In a Group Policy object, this command returns all settings to not configured and deletes all connection security and firewall rules.
netsh advfirewall reset
Resets the BranchCache service. Flushes the local cache. Every configuration parameter of BranchCache will be reset to its default value.
netsh branchcache reset
Resets TCP/IP and related components to a clean state.
netsh int ipv4 reset %temp%\ipv4_rst.log
Resets IPv6 configuration state.
netsh int ipv6 reset %temp%\ipv6_rst.log
Resets Winsock Catalog to a clean state. All Winsock Layered Service Providers which were previously installed must be reinstalled. This command does not affect Winsock Name Space Provider entries.
netsh winsock reset catalog
Enable / Disable network card (NIC) using netsh
Show network interfaces (interface name to be used to disable / enable network card).
netsh interface show interface
Disable network interface by name
netsh interface set interface name="Local Area Connection" admin=disabled
Enable network interface by name
netsh interface set interface name="Local Area Connection" admin=enabled
Enable / Disable network card interface using WMIC
Get NIC list and index number:
wmic nic get name, index
Enable NIC with index number: (eg: 7)
wmic path win32_networkadapter where index=7 call enable
Disable NIC with index number: (eg: 7)
wmic path win32_networkadapter where index=7 call disable
Enable by name
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call disable
Disable by name
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable