Microsoft Windows [Version 10.0.22621.2428]
(c) Microsoft Corporation. C:\Windows>netsh lan ? The following commands are available: Commands in this 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. To view help for a command, type the command, followed by a space, and then type ?.
Adds a configuration entry to a table.
»netsh »lan »add
C:\Windows>netsh lan add ? The following commands are available: Commands in this context: add profile - Adds a LAN profile to specified interface on the machine.
Adds a LAN profile to specified interface on the machine.
»netsh »lan »add »profile
C:\Windows>netsh lan add profile ? Usage: add profile [filename=]<string> [interface=]<string> Parameters: filename - name of the profile XML file interface - interface name Remarks: Parameter filename is required. It is the name of the XML file containing the profile data. Parameter interface is optional. It is one of the interface name shown by "netsh lan show interface" command. If interface name is given, the profile will be added to the specified interface, otherwise the machine profile will be added. Examples: add profile filename="Profile1.xml" interface="Local Area Connection" add profile filename="Profile1.xml"
Deletes a configuration entry from a table.
»netsh »lan »delete
C:\Windows>netsh lan delete ? The following commands are available: Commands in this context: delete profile - Deletes a LAN profile from one or multiple interfaces.
Deletes a LAN profile from one or multiple interfaces.
»netsh »lan »delete »profile
C:\Windows>netsh lan delete profile ? Usage: delete profile [interface=]<string> Parameters: interface - interface name Remarks: Parameter interface is optional. If interface is specified profile will be deleted from the specified interface only. If interface is not specified machine profile will be deleted. Examples: delete profile interface="Local Area Connection" delete profile
Displays a configuration script.
»netsh »lan »dump
C:\Windows>netsh lan dump ? Usage: dump Remarks: Creates a script that contains the current configuration. If saved to a file, this script can be used to restore altered configuration settings.
Saves LAN profiles to XML files.
»netsh »lan »export
C:\Windows>netsh lan export ? The following commands are available: Commands in this context: export profile - Exports specified profiles to XML files.
Exports specified profiles to XML files.
»netsh »lan »export »profile
C:\Windows>netsh lan export profile ? Usage: export profile [folder=]<string> [ [interface=]<string> ] Parameters: folder - name of the folder where the profile XML files will be saved interface - name of the interface which has this profile configured Remarks: This command saves the selected profiles into XML files named as "Interface Name.XML". Parameter interface is optional. The folder name is mandatory. It must specify an existing folder accessible from the local computer. It can either be an absolute path, or a relative path to the current working directory. In addition, "." refers to the current working directory, and ".." refers to the parent directory of the current working directory. The folder name cannot be a UNC path. If interface name is given, the profile on the given interface will be saved as "Interface name.xml", Otherwise all profiles will be exported. Machine profile will be saved as "MachineProfile.xml" Examples: export profile folder=. interface="Local Area Connection" export profile folder=c:\lan\profiles
Displays a list of commands.
»netsh »lan »help
C:\Windows>netsh lan help ? Usage: help Remarks: Displays a list of commands.
Reconnects on an interface.
»netsh »lan »reconnect
C:\Windows>netsh lan reconnect ? Usage: reconnect [ [interface=]<string> ] Parameters: interface - name of the interface on which this setting is to be applied Remarks: Parameter interface is optional. If interface name is given, only the given interface will reconnect. Otherwise, all interfaces will reconnect. Examples: reconnect interface="Local Area Connection"
Configures settings on interfaces.
»netsh »lan »set
C:\Windows>netsh lan set ? The following commands are available: Commands in this context: set allowexplicitcreds - Allow or disallow the user to use shared user credentials for network authentication. set autoconfig - Enables or disables auto-configuration on an interface. set blockperiod - Set the block period. set eapuserdata - Adds EAP user data to an interface. set profileparameter - Set parameters in a wired network profile. set tracing - Enables or disables tracing.
Allow or disallow the user to use shared user
»netsh »lan »set »allowexplicitcreds
C:\Windows>netsh lan set allowexplicitcreds ? Usage: set allowexplicitcreds [allow=]yes|no Parameters: Tag Value allow - Allow or disallow shared user credentials. Remarks: Specify whether to allow or disallow shared user credentials on the client for network authentication. The parameter allow is required. Examples: set allowexplicitcreds allow=yes
Enables or disables auto-configuration on an interface.
»netsh »lan »set »autoconfig
C:\Windows>netsh lan set autoconfig ? Usage: set autoconfig [enabled=]yes|no [interface=]<string> Parameters: enabled - specifies whether auto-configuration is enabled or not interface - name of the interface on which this setting is to be applied Remarks: Both parameters are required. Examples: set autoconfig enabled=yes interface="Local Area Connection" set autoconfig enabled=no interface="Local Area Connection"
Set the block period.
»netsh »lan »set »blockperiod
C:\Windows>netsh lan set blockperiod ? Usage: set blockperiod [value=]0-60 Parameters: Tag Value value - Specifies the length in time, in minutes, during which auto connect attempts to this network will be suspended. Remarks: Modifies the specified timer. The value is specified in minutes. The blocked state is reset upon a manual connection attempt, a session change or a media connect. Examples: set blockperiod value=2 set blockperiod 25
Adds EAP user data to an interface.
»netsh »lan »set »eapuserdata
C:\Windows>netsh lan set eapuserdata ? Usage: set eapuserdata [filename=]<string> [allusers=]yes|no [interface=]<string> Parameters: filename - name of the user data XML file allusers - specifies whether userdata should be saved for all users or current user interface - name of the interface on which this setting is to be applied Remarks: Filename and allusers parameters are required. If interface is not specified machine userdata will be set. Examples: set eapuserdata filename="UserData.xml" allusers=yes interface="Local Area Connection" set eapuserdata filename="UserData.xml" allusers=no interface="Local Area Connection" set eapuserdata filename="UserData.xml" allusers=yes set eapuserdata filename="UserData.xml" allusers=no
Set parameters in a wired network profile.
»netsh »lan »set »profileparameter
C:\Windows>netsh lan set profileparameter ? Usage: set profileparameter [[interface=]<string>] [authMode=machineOrUser|machineOnly|userOnly|guest] [ssoMode=preLogon|postLogon|none] [maxDelay=1-120] [allowDialog=yes|no] [userVLAN=yes|no] [oneXEnabled=yes|no] [oneXEnforced=yes|no] Parameters: Tag Value interface - Name of the interface on which the profile is set. authMode - Type of credentials to be used for authentication. ssoMode - Type of single sign on to be attempted if any. maxDelay - Timeout value to establish single sign on connection. allowDialog - Allow or Disallow a dialog to be shown for preLogon. userVLAN - Specify if the network switches to a different VLAN on user authentication. oneXEnabled - OneX authentication is enabled or not. oneXEnforced - OneX authentication is enforced or not. Remarks: Modifies the profile on specified interface. If the interface is specified then only profile on that interface is modified. At least one parameter besides interface must be specified. Examples: set profileparameter authMode=userOnly ssoMode=preLogon set profileparameter interface="Local Area Connection" ssoMode=none
Enables or disables tracing.
»netsh »lan »set »tracing
C:\Windows>netsh lan set tracing ? Usage: set tracing [mode=]yes|no|persistent] Parameters: Tag Value mode - Enable, make it persistent or disable tracing. Remarks: Enabled or disable tracing, with the option to make tracing persistent. If enabled then the trace logs for wired LAN will be collected and saved to the trace files. The parameter mode is required. Under persistent mode the tracing will still be effective after system reboot. If mode is set to disable, then both persistent and nonpersistent tracing will be stopped. Examples: set tracing mode=yes
Displays information.
»netsh »lan »show
C:\Windows>netsh lan show ? The following commands are available: Commands in this context: show interfaces - Shows a list of the current wired interfaces on the system. show profiles - Shows a list of wired profiles currently configured on the machine. show settings - Shows the current global settings of wired LAN. show tracing - Shows whether wired LAN tracing is enabled or disabled.
Shows a list of the current wired interfaces on the system.
»netsh »lan »show »interfaces
C:\Windows>netsh lan show interfaces ? Usage: show interfaces Remarks: This command shows the wired interfaces configured on the system. There are no parameters for this command. Examples: show interfaces
Shows a list of wired profiles currently configured on the machine.
»netsh »lan »show »profiles
C:\Windows>netsh lan show profiles ? Usage: show profiles [ [interface=]<string> ] Parameters: interface - name of the interface which has this profile configured Remarks: Parameter interface is optional. If interface name is given, only the profile on the given interface will be displayed. Otherwise, all profiles will be displayed. Examples: show profiles interface="Local Area Connection" show profiles
Shows the current global settings of wired LAN.
»netsh »lan »show »settings
C:\Windows>netsh lan show settings ? Usage: show settings Remarks: Shows the global settings for wired network service, including whether auto connection logic is enabled or not on each interface. Examples: show settings
Shows whether wired LAN tracing is enabled or disabled.
»netsh »lan »show »tracing
C:\Windows>netsh lan show tracing ? Usage: show tracing Remarks: Shows whether wired LAN tracing is enabled or disabled. Examples: show tracing
- de -/- en -