Manage Learn to apply best practices and optimize your operations.

Top Windows command-line commands

1/6

When to use a command-line command

Source:  iStock/RUSSELLTATEdotCOM
Visual Editor: Sarah Evans/TechTarget

For desktop administrators,a graphical user interface provides helpful display features such as windows, pull-down menus and scroll bars. But a tried-and-true command-line command can accomplish almost all of the same tasks -- sometimes more efficiently, especially if you're scripting.

Windows 7 has myriad command-line scripts built into the operating system that you can use to shut down a user's computer, turn a firewall on or off, or force an update. Because they're so useful and there are so many, it's a good idea to start exploring some basic Windows 7 command prompts.

Here's one to get you started. If you run a large network space, you can apply all of the commands in this slideshow to a group of remote computers with this command-line command:

FOR /L %i IN (1,1,254) DO netsh -r 192.168.1.%i advfirewall show allprofiles >192.168.1.%i.firewallstate.txt.

This will execute whatever command you need on multiple computers or IP addresses.

In the example above, netsh is a place holder. You can put any switch you want in its place to execute across multiple computers.

View All Photo Stories

Join the conversation

3 comments

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

What is your most-used command?
Cancel

ip config


Cancel
probably FTP but it's been a very long time since I used the command line. Either that or for printing a directory 
dir %1 /-p /o:gn > "%temp%\Listing"
then 
start /w notepad /p "%temp%\Listing"
Cancel

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close