Netsh, or net shell, is a powerful administration tool used by systems administrators to quickly and easily modify the network configuration of a server or network, while Visual Basic Script (VBS) is a powerful scripting language designed to automate tasks on a Windows computer. Combined, they make a powerful time-saving device for administrators who need to perform the same command repeatedly on different computers and at different times.
- Skill level:
Other People Are Reading
Open a text editor.
Paste the following into your text editor:
set oShell = WScript.CreateObject("WScript.shell")
This initialises a shell for your script that can be used to run other applications.
Paste the following command immediately afterward:
oShell.run "command.com /c netsh -c interface dump > interfaces.txt"
This will save all the network interface configuration details to the file "interfaces.txt." Altnernatively, you might try this:
oShell.run "command.com /c netsh firewall set opmode disable"
As you might guess, this disables the firewall on the computer. It can be re-enabled by using the same command with "disable" replaced with "enable."
Tips and warnings
- Nearly any task of network configuration can be automated by calling Netsh from Visual Basic Script.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for