Rob van der Woude's Scripting Pages

NETSH

NETSH, Version 10.0.18362.1


Usage: NETSH [-a AliasFile] [-c Context] [-r RemoteMachine] [-u [DomainName\]UserName] [-p Password | *]
             [Command | -f ScriptFile]

The following commands are available:

Commands in this context:
?              - Displays a list of commands.
add            - Adds a configuration entry to a list of entries.
advfirewall    - Changes to the 'netsh advfirewall' context.
branchcache    - Changes to the 'netsh branchcache' context.
bridge         - Changes to the 'netsh bridge' context.
delete         - Deletes a configuration entry from a list of entries.
dhcpclient     - Changes to the 'netsh dhcpclient' context.
dnsclient      - Changes to the 'netsh dnsclient' context.
dump           - Displays a configuration script.
exec           - Runs a script file.
firewall       - Changes to the 'netsh firewall' context.
help           - Displays a list of commands.
http           - Changes to the 'netsh http' context.
interface      - Changes to the 'netsh interface' context.
ipsec          - Changes to the 'netsh ipsec' context.
lan            - Changes to the 'netsh lan' context.
mbn            - Changes to the 'netsh mbn' context.
namespace      - Changes to the 'netsh namespace' context.
netio          - Changes to the 'netsh netio' context.
p2p            - Changes to the 'netsh p2p' context.
ras            - Changes to the 'netsh ras' context.
rpc            - Changes to the 'netsh rpc' context.
set            - Updates configuration settings.
show           - Displays information.
trace          - Changes to the 'netsh trace' context.
wcn            - Changes to the 'netsh wcn' context.
wfp            - Changes to the 'netsh wfp' context.
winhttp        - Changes to the 'netsh winhttp' context.
winsock        - Changes to the 'netsh winsock' context.
wlan           - Changes to the 'netsh wlan' context.

The following sub-contexts are available:
 advfirewall branchcache bridge dhcpclient dnsclient firewall http interface ipsec lan mbn namespace netio p2p ras rpc trace wcn wfp winhttp winsock wlan

To view help for a command, type the command, followed by a space, and then
 type ?.

The following commands are available in the NETSH ADVFIREWALL context:

?              - Displays a list of commands.
consec         - Changes to the 'netsh advfirewall consec' context.
dump           - Displays a configuration script.
export         - Exports the current policy to a file.
firewall       - Changes to the 'netsh advfirewall firewall' context.
help           - Displays a list of commands.
import         - Imports a policy file into the current policy store.
mainmode       - Changes to the 'netsh advfirewall mainmode' context.
monitor        - Changes to the 'netsh advfirewall monitor' context.
reset          - Resets the policy to the default out-of-box policy.
set            - Sets the per-profile or global settings.
show           - Displays profile or global properties.

The following commands are available in the NETSH BRANCHCACHE context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
exportkey      - Exports the content information key.
flush          - Flushes the contents of the cache.
help           - Displays a list of commands.
importkey      - Imports a new content information key.
reset          - Resets the BranchCache service.
set            - Sets configuration parameters.
show           - Displays configuration parameters.
smb            - Changes to the 'netsh branchcache smb' context.

The following commands are available in the NETSH BRIDGE context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
help           - Displays a list of commands.
install        - Installs the component corresponding to the current context.
set            - Sets configuration information.
show           - Displays information.
uninstall      - Removes the component corresponding to the current context.

The following commands are available in the NETSH DHCPCLIENT context:


The following commands are available in the NETSH DNSCLIENT context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a table.
delete         - Deletes a configuration entry from a table.
dump           - Displays a configuration script.
help           - Displays a list of commands.
set            - Sets configuration information.
show           - Displays information.

The following commands are available in the NETSH FIREWALL context:

?              - Displays a list of commands.
add            - Adds firewall configuration.
delete         - Deletes firewall configuration.
dump           - Displays a configuration script.
help           - Displays a list of commands.
set            - Sets firewall configuration.
show           - Shows firewall configuration.

The following commands are available in the NETSH HTTP context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a table.
delete         - Deletes a configuration entry from a table.
dump           - Displays a configuration script.
flush          - Flushes internal data.
help           - Displays a list of commands.
show           - Displays information.
update         - Updates a configuration entry to a table.

The following commands are available in the NETSH INTERFACE context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
help           - Displays a list of commands.
httpstunnel    - Changes to the 'netsh interface httpstunnel' context.
isatap         - Changes to the 'netsh interface isatap' context.
portproxy      - Changes to the 'netsh interface portproxy' context.
set            - Sets configuration information.
show           - Displays information.
tcp            - Changes to the 'netsh interface tcp' context.
teredo         - Changes to the 'netsh interface teredo' context.

The following commands are available in the NETSH IPSEC context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
dynamic        - Changes to the 'netsh ipsec dynamic' context.
help           - Displays a list of commands.
static         - Changes to the 'netsh ipsec static' context.

The following commands are available in the NETSH LAN context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a table.
delete         - Deletes a configuration entry from a table.
dump           - Displays a configuration script.
export         - Saves LAN profiles to XML files.
help           - Displays a list of commands.
reconnect      - Reconnects on an interface.
set            - Configures settings on interfaces.
show           - Displays information.

The following commands are available in the NETSH MBN context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a table.
connect        - Connects to a Mobile Broadband network.
delete         - Deletes a configuration entry from a table.
disconnect     - Disconnects from a Mobile Broadband network.
dump           - Displays a configuration script.
help           - Displays a list of commands.
set            - Sets configuration information.
show           - Displays information.

The following commands are available in the NETSH NAMESPACE context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
help           - Displays a list of commands.
show           - Displays information.

The following commands are available in the NETSH NETIO context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a table.
delete         - Deletes a configuration entry from a table.
dump           - Displays a configuration script.
help           - Displays a list of commands.
show           - Displays information.

The following commands are available in the NETSH P2P context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
group          - Changes to the 'netsh p2p group' context.
help           - Displays a list of commands.
idmgr          - Changes to the 'netsh p2p idmgr' context.
pnrp           - Changes to the 'netsh p2p pnrp' context.

The following commands are available in the NETSH RAS context:

?              - Displays a list of commands.
aaaa           - Changes to the 'netsh ras aaaa' context.
add            - Adds items to a table.
delete         - Removes items from a table.
diagnostics    - Changes to the 'netsh ras diagnostics' context.
dump           - Displays a configuration script.
help           - Displays a list of commands.
ip             - Changes to the 'netsh ras ip' context.
set            - Sets configuration information.
show           - Displays information.

The following commands are available in the NETSH RPC context:

?              - Displays a list of commands.
add            - Creates an Add list of subnets. 
delete         - Creates a Delete list of subnets. 
dump           - Displays a configuration script.
filter         - Changes to the 'netsh rpc filter' context.
help           - Displays a list of commands.
reset          - Resets the selective binding settings to 'none' (listen on all interfaces). 
show           - Displays the selective binding state for each subnet on the system.

The following commands are available in the NETSH TRACE context:

?              - Displays a list of commands.
convert        - Converts a trace file to an HTML report.
correlate      - Normalizes or filters a trace file to a new output file.
diagnose       - Start a diagnose session.
dump           - Displays a configuration script.
export         - Exports a scenario to a WPR profile.
help           - Displays a list of commands.
merge          - Merges trace files and adds symbols metadata.
postreset      - 
show           - List interfaces, providers and tracing state.
start          - Starts tracing.
stop           - Stops tracing.

The following commands are available in the NETSH WCN context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
enroll         - Connects to a wireless network.
help           - Displays a list of commands.
query          - Queries information about a WCN device.

The following commands are available in the NETSH WFP context:

?              - Displays a list of commands.
capture        - Captures real-time diagnostic information.
dump           - Displays a configuration script.
help           - Displays a list of commands.
set            - Sets WFP diagnostic options.
show           - Shows WFP configuration and state.

The following commands are available in the NETSH WINHTTP context:

?              - Displays a list of commands.
dump           - Displays a configuration script.
help           - Displays a list of commands.
import         - Imports WinHTTP proxy settings.
reset          - Resets WinHTTP settings.
set            - Configures WinHTTP settings.
show           - Displays currents settings.

The following commands are available in the NETSH WINSOCK context:

?              - Displays a list of commands.
audit          - Displays a list of Winsock LSPs that have been installed and removed.
dump           - Displays a configuration script.
help           - Displays a list of commands.
remove         - Removes a Winsock LSP from the system.
reset          - Resets the Winsock Catalog to a clean state.
set            - Sets Winsock options.
show           - Displays information.

The following commands are available in the NETSH WLAN context:

?              - Displays a list of commands.
add            - Adds a configuration entry to a table.
connect        - Connects to a wireless network.
delete         - Deletes a configuration entry from a table.
disconnect     - Disconnects from a wireless network.
dump           - Displays a configuration script.
export         - Saves WLAN profiles to XML files.
help           - Displays a list of commands.
refresh        - Refresh hosted network settings.
reportissues   - Generate WLAN smart trace report.
set            - Sets configuration information.
show           - Displays information.
start          - Start hosted network.
stop           - Stop hosted network.

 

Notes 1: The above help listing was created using NETSHHelp.bat.
  2: See silent installations, network section for a usage example.
  3: When running NETSH Interface interactively (type NETSH {Enter} Interface {Enter}) you may see the following warning text:

In future versions of Windows, Microsoft might remove the Netsh functionality for TCP/IP.

Microsoft recommends that you transition to Windows PowerShell if you currently use netsh to configure and manage TCP/IP.

Type Get-Command -Module NetTCPIP at the Windows PowerShell prompt to view a list of commands to manage TCP/IP.

Visit https://go.microsoft.com/fwlink/?LinkId=217627 for additional information about PowerShell commands for TCP/IP.
  4: This page shows the syntax for NETSH, Version 10.0.18362.1 (Windows 10), see NETSH, Version 6.1.7600.16385 for an older (Windows 7) version.

page last modified: 2020-08-25; loaded in 0.0016 seconds