{
	"id": "f9c1e17a-4e22-4c7e-920d-1eb4cf64b1e1",
	"created_at": "2026-04-06T00:06:53.395529Z",
	"updated_at": "2026-04-10T03:21:41.065017Z",
	"deleted_at": null,
	"sha1_hash": "19353d439657adb3673739c411be97dfa30c00e4",
	"title": "Using Netsh",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 89772,
	"plain_text": "Using Netsh\r\nBy Archiveddocs\r\nArchived: 2026-04-05 13:27:53 UTC\r\nNetsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the\r\nnetwork configuration of a computer that is currently running. Netsh also provides a scripting feature that allows\r\nyou to run a group of commands in batch mode against a specified computer. Netsh can also save a configuration\r\nscript in a text file for archival purposes or to help you configure other servers.\r\nNetsh contexts\r\nNetsh interacts with other operating system components using dynamic-link library (DLL) files. Each Netsh\r\nhelper DLL provides an extensive set of features called a context, which is a group of commands specific to a\r\nnetworking component. These contexts extend the functionality of netsh by providing configuration and\r\nmonitoring support for one or more services, utilities, or protocols. For example, Dhcpmon.dll provides netsh the\r\ncontext and set of commands necessary to configure and manage DHCP servers.\r\nTo run a netsh command, you must start netsh from the Cmd.exe prompt and change to the context that contains\r\nthe command you want to use. The contexts that are available to you depend on which networking components\r\nyou have installed. For example, if you type dhcp at the Netsh command prompt, you change to the DHCP\r\ncontext, but if you do not have DHCP installed the following message appears:\r\nThe following command was not found: dhcp.\r\nFor more information about Netsh contexts, see the following topics:\r\nNetsh commands for AAAA \r\nNetsh commands for DHCP \r\nNetsh diagnostic (diag) commands \r\nNetsh commands for Interface IP \r\nNetsh commands for RAS \r\nNetsh commands for Routing \r\nNetsh commands for WINS \r\nUsing multiple contexts\r\nA context can exist within a context. For example, within the Routing context, you can change to the IP and IPX\r\nsubcontexts.\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 1 of 12\n\nTo display a list of commands and subcontexts that you can use within a context, at the netsh prompt, type the\r\ncontext name, and then type either /? or help. For example, to display a list of subcontexts and commands that you\r\ncan use in the Routing context, at the netsh prompt (that is, netsh\u003e), type either of the following:\r\nrouting /?\r\nrouting help\r\nTo perform tasks in another context without changing from your current context, type the context path of the\r\ncommand you want to use at the netsh prompt. For example, to add the Local Area Connection interface in the\r\nIGMP context without changing to the IGMP context, at the netsh prompt, type:\r\nrouting ip igmp add interface \"Local Area Connection\" startupqueryinterval=21\r\nRunning Netsh commands from the Cmd.exe command prompt\r\nWhen you run Netsh from the Cmd.exe command prompt, netsh uses the following syntax. To run these Netsh\r\ncommands on a remote Windows 2000 Server, you must first use Remote Desktop Connection to connect to a\r\nWindows 2000 Server that is running Terminal Server. There might be functional differences between Netsh\r\ncontext commands on Windows 2000 and Windows XP.\r\nTo view the command syntax, click the following command:\r\nnetsh \r\nNetsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the\r\nnetwork configuration of a currently running computer. Used without parameters, netsh opens the Netsh.exe\r\ncommand prompt (that is, netsh\u003e).\r\nSyntax\r\nnetsh [-a AliasFile] [-c Context] [-r RemoteComputer] [{NetshCommand|-f ScriptFile}]\r\nParameters\r\n-a   : Returns you to the netsh prompt after running AliasFile.\r\nAliasFile   : Specifies the name of the text file that contains one or more netsh commands.\r\n-c   : Changes to the specified netsh context.\r\nContext   : Specifies the netsh context. The following table lists the available netsh contexts.\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 2 of 12\n\nContext Description\r\nAAAA\r\nShows and sets the configuration of the authentication, authorization, accounting, and auditing\r\n(AAAA) database used by the Internet Authentication Service (IAS) and the Routing and Remote\r\nAccess service.\r\nDHCP Administers DHCP servers and provides an equivalent alternative to console-based management.\r\nDiag Administers and troubleshoots operating system and network service parameters.\r\nInterface\r\nConfigures the TCP/IP protocol (including addresses, default gateways, DNS servers, and WINS\r\nservers) and displays configuration and statistical information.\r\nRAS Administers remote access servers.\r\nRouting Administers Routing servers.\r\nWINS Administers WINS servers.\r\n-r   : Configures a remote computer.\r\nRemoteComputer   : Specifies the remote computer to configure.\r\nNetshCommand   : Specifies the netsh command that you want to run.\r\n-f   : Exits Netsh.exe after running the script.\r\nScriptFile   : Specifies the script that you want to run.\r\n/? : Displays help at the command prompt.\r\nUsing -r \r\nIf you specify -r followed by another command, netsh executes the command on the remote computer and\r\nthen returns to the Cmd.exe command prompt. If you specify -r without another command, netsh opens in\r\nremote mode. The process is similar to using set machine at the Netsh command prompt. When you use -r,\r\nyou set the target computer for the current instance of netsh only. After you exit and reenter netsh, the\r\ntarget computer is reset as the local computer. You can run netsh commands on a remote computer by\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 3 of 12\n\nspecifiying a computer name stored in WINS, a UNC name, an internet name to be resolved by the DNS\r\nserver, or a numerical IP address.\r\nRunning Netsh commands from the Netsh.exe command prompt\r\nNetsh uses the following standard commands in all contexts that you can run from a Netsh.exe command prompt\r\n(that is, netsh\u003e). To run these Netsh commands on a remote Windows 2000 Server, you must first use Remote\r\nDesktop Connection to connect to a Windows 2000 Server that is running Terminal Server. There might be\r\nfunctional differences between Netsh context commands on Windows 2000 and Windows XP.\r\nTo view the command syntax, click a command:\r\n..\r\nMoves to the context that is one level up.\r\nSyntax\r\n.. \r\nParameters\r\n/? : Displays help at the command prompt.\r\nabort\r\nDiscards any changes made in offline mode. Abort has no effect in online mode.\r\nSyntax\r\nabort\r\nParameters\r\n/? : Displays help at the command prompt.\r\nadd helper\r\nInstalls the helper DLL in netsh.\r\nSyntax\r\nadd helper DLLName \r\nParameters\r\nDLLName   : Required. Specifies the name of the helper DLL you want to install.\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 4 of 12\n\n/? : Displays help at the command prompt.\r\nalias\r\nAdds an alias that consists of a user-defined character string, which netsh treats as equivalent to another character\r\nstring. Used without parameters, alias displays all available aliases.\r\nSyntax\r\nalias [AliasName] [string1 [string2 ...]]\r\nParameters\r\nalias [ AliasName ] : Displays the specified alias.\r\nalias   [ AliasName ][ string1 [ string2 ...]] : Sets AliasName to the specified string(s).\r\n/? : Displays help at the command prompt.\r\nExamples\r\nThe following netsh sample script sets two netsh aliases, Shaddr and Shp, and then leaves the Netsh command\r\nprompt in the Interface IP context:\r\nalias shaddr show interface ip addr\r\nalias shp show helpers\r\ninterface ip\r\nIf you type shaddr at the Netsh command prompt, Netsh.exe interprets this as the command show interface ip\r\naddr. If you type shp at the Netsh command prompt, Netsh.exe interprets this as the command show helpers.\r\nbye\r\nExits Netsh.exe.\r\nSyntax\r\nbye\r\nParameters\r\n/? : Displays help at the command prompt.\r\ncommit\r\nCommits any changes made in the offline mode to the router. Commit has no effect in online mode.\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 5 of 12\n\nSyntax\r\ncommit\r\nParameters\r\n/? : Displays help at the command prompt.\r\ndelete helper\r\nRemoves the helper DLL from netsh.\r\nSyntax\r\ndelete helper DLLName\r\nParameters\r\nDLLName   : Required. Specifies the name of the helper DLL you want to uninstall.\r\n/? : Displays help at the command prompt.\r\ndump\r\nCreates a script that contains the current configuration. If you save this script to a file, you can use the file to\r\nrestore configuration settings that have been changed. Used without parameters, dump displays all of the netsh\r\ncontext configurations.\r\nSyntax\r\ndump [FileName]\r\nParameters\r\n[ FileName ] : Specifies the name of the file to which you want to redirect output.\r\n/? : Displays help at the command prompt.\r\nexec\r\nLoads a script file and runs commands from it.\r\nSyntax\r\nexec ScriptFile\r\nParameters\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 6 of 12\n\nScriptFile   : Required. Specifies the name of the script that you want to load and run.\r\nThe ScriptFile can run on one or more computers.\r\nexit\r\nExits Netsh.exe.\r\nSyntax\r\nexit\r\nParameters\r\n/? : Displays help at the command prompt.\r\nhelp\r\nDisplays help.\r\nSyntax\r\n{/?|?|help|h}\r\nParameters\r\nnone\r\noffline\r\nSets the current mode to offline.\r\nSyntax\r\noffline\r\nParameters\r\n/? : Displays help at the command prompt.\r\nChanges that you make in this mode are saved, but you need to run the commit or online command to set\r\nthe changes in the router.\r\nWhen you switch from offline mode to online mode, changes that you made in offline mode are reflected\r\nin the configuration that is currently running.\r\nChanges that you make in online mode are immediately reflected in the configuration that is currently\r\nrunning.\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 7 of 12\n\nonline\r\nSets the current mode to online.\r\nSyntax\r\nonline\r\nParameters\r\n/? : Displays help at the command prompt.\r\nChanges that you make in online mode are immediately reflected in the configuration that is currently\r\nrunning.\r\nWhen you switch from offline mode to online mode, changes that you made in offline mode are reflected\r\nin the configuration that is currently running.\r\npopd\r\nRestores a context from the stack.\r\nSyntax\r\npopd \r\nParameters\r\n/? : Displays help at the command prompt.\r\nUsed in conjunction with pushd, popd enables you to change the context, run the command in the new\r\ncontext, and then resume the prior context.\r\nExamples\r\nThe following sample script changes a context from the root context to the interface ip context, adds a static IP\r\nroute, and then returns to the root context:\r\nnetsh\u003e\r\npushd\r\nnetsh\u003e\r\ninterface ip\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 8 of 12\n\nnetsh interface ip\u003e\r\nset address local static 10.0.0.9 255.0.0.0 10.0.0.1 1\r\nnetsh interface ip\u003e\r\npopd \r\nnetsh\u003e\r\npushd\r\nSaves the current context on a first-in-last-out (FILO) stack.\r\nSyntax\r\npushd \r\nParameters\r\n/? : Displays help at the command prompt.\r\nUsed in conjunction with popd, pushd enables you to change the context, run the command in the new\r\ncontext, and then resume the prior context.\r\nquit\r\nExits Netsh.exe.\r\nSyntax\r\nquit\r\nParameters\r\n/? : Displays help at the command prompt.\r\nset file\r\nCopies the Command Prompt window output to a file.\r\nSyntax\r\nset file {open FileName|append FileName|close}\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 9 of 12\n\nParameters\r\nopen   FileName   : Sends the Command Prompt window output to the specified file.\r\nappend   FileName   : Appends the Command Prompt window output to the specified existing file.\r\nclose   : Stops sending output and closes a file.\r\n/? : Displays help at the command prompt.\r\nUsing FileName \r\nIf the specified FileName does not currently exist, netsh creates a new file with that name. If the specified\r\nFileName does currently exist, netsh overwrites the existing data.\r\nExamples\r\nTo create a new log file called Session.log and copy all succeeding netsh input and output to Session.log, type:\r\nset file open c:\\session.log\r\nset machine\r\nSets the current computer on which to perform configuration tasks. Used without parameters, set machine sets the\r\nlocal computer.\r\nSyntax\r\nset machine [[ComputerName**=**]string]\r\nParameters\r\nComputerName   : Specifies the name of the computer on which to perform configuration tasks.\r\nstring   : Specifies the location of the remote computer.\r\n/? : Displays help at the command prompt.\r\nPerforming configuration tasks on multiple computers\r\nYou can run commands on multiple computers from a single script. You can use set machine in a script to\r\nspecify a destination computer (for example, ComputerA), and then run the commands that follow set\r\nmachine on this computer (that is, ComputerA). You can then use set machine to specify another\r\ndestination computer (for example, ComputerB), and then run commands on this computer (that is,\r\nComputerB).\r\nset mode\r\nSets the current mode to online or offline.\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 10 of 12\n\nSyntax\r\nset mode {online|offline}\r\nParameters\r\nonline   : Sets the current mode to online.\r\noffline   : Sets the current mode to offline.\r\n/? : Displays help at the command prompt.\r\nshow \r\nDisplays alias, helper, and mode information.\r\nSyntax\r\nshow {alias|helper|mode}\r\nParameters\r\nalias   : Lists all defined aliases.\r\nhelper   : Lists all top-level helpers.\r\nmode   : Displays the current mode.\r\n/? : Displays help at the command prompt.\r\nunalias\r\nDeletes the specified alias.\r\nSyntax\r\nunalias AliasName\r\nParameters\r\nAliasName   : Required. Specifies the name of the alias.\r\n/? : Displays help at the command prompt.\r\nFormatting legend\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 11 of 12\n\nFormat Meaning\r\nItalic Information that the user must supply\r\nBold\r\nElements that the user must type exactly as\r\nshown\r\nEllipsis (...)\r\nParameter that can be repeated several times in a\r\ncommand line\r\nBetween brackets ([]) Optional items\r\nBetween braces ({}); choices separated by pipe (|).\r\nExample: {even|odd}\r\nSet of choices from which the user must choose\r\nonly one\r\nCourier font Code or program output\r\nSource: https://technet.microsoft.com/library/bb490939.aspx\r\nhttps://technet.microsoft.com/library/bb490939.aspx\r\nPage 12 of 12",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://technet.microsoft.com/library/bb490939.aspx"
	],
	"report_names": [
		"bb490939.aspx"
	],
	"threat_actors": [],
	"ts_created_at": 1775434013,
	"ts_updated_at": 1775791301,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/19353d439657adb3673739c411be97dfa30c00e4.pdf",
		"text": "https://archive.orkl.eu/19353d439657adb3673739c411be97dfa30c00e4.txt",
		"img": "https://archive.orkl.eu/19353d439657adb3673739c411be97dfa30c00e4.jpg"
	}
}