Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The aim for this Wiki is to promote using a command to open up commonly used applications without having to go through many mouse clicks - thus saving time on monitoring and troubleshooting Windows machines.

Answer entries need to specify

  • Application name
  • Commands
  • Screenshot (Optional)

Shortcut to commands


locked by Zypher Dec 11 '11 at 21:18

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

If you find this stuff interesting, take a look at commandlinefu: It's basically like digg for CLI – username May 11 '09 at 6:47
great list, very usefull – Adyt May 20 '09 at 8:56
Try putting each command as a separate answer. Then we can vote and comment on each one. – lamcro Jun 26 '09 at 12:22
This is a great question, super useful info, and the stackexchange engine made it trivial to find. I agree with @lamcro, however, that structuring each command as an individual answer would likely provide more value, however then the wouldn't be sorted alphabetically? hmmm... – David Alpert Jul 29 '09 at 22:00
This is a great example, across all SE, of a well-executed poll. I especially like combining separate answers (for voting) and alphabetical index to them! – Jonik Sep 17 '10 at 14:16

160 Answers 160

To quickly open the Exchange 2007 Management Shell:


Active Directory Sites and Services:


Basically, anything in the start menu I try to grab the properties of the shortcuts and find out what they actually call.

Oh, and the "elevated" command-prompt in Vista:

Start -> from the Search box "cmd" + Ctrl+Shift+Enter



Opens up Windows Performance Monitor.


The key combination . . . notepad will show all files in the directory, use the up and down key to select, then enter to execute the command. Very useful for lazy typers like myself.


shows the MAC address of any network adapters installed.

Thanks, justingrif but this has already been posted -… – Sung Sep 14 '09 at 22:37

dsa.msc - opens active directory users and computers.

whoami /all

Used to be reskit.


for Server 2003,2000 & XP - Does not apply to Server 2008, Vista or Win7(as far as I know)

Shows installed Hotfixes applied to the server/workstation.

More detail at ->




vssadmin list shadows [/set={shadow copy set guid}]
        Lists all shadow copies in the system, grouped by shadow copy set Id.

vssadmin list writers
        Lists all writers in the system

vssadmin list providers
        Lists all currently installed shadow copy providers

vssadmin is essential to troubleshooting backup products that use vss. With vssadmin you can check writer status, and list all outstanding shadow copies on a volume. Very handy.


I particularly like pushd and popd for directory navigation via stack. Not only can they change the current folder, they can also change the current drive. (cd /d can do this too.) What's more, if you try to pushd to a UNC path, the shell will automatically map the share to a drive letter starting from Z and working backwards. When the matching popd is called, the drive is unmapped automatically.


A particularly useful aspect of netsh that I think is worth a mention: netsh winsock reset This was added in XP service pack 2 to reset the tcpip implementation back to its defaults. In versions prior to XP, this was accomplished by uninstalling and reinstalling TCP/IP. Prior to SP2 you either needed the winsockxpfix.exe application or an ugly method of ripping out tcp/ip and reinstalling it. This command can correct issues where tcp/ip becomes corrupted for whatever reason.

Also, the HELP command lists a whole slew of other commands that can be of use.


Change {username}'s password:

net user {username} {newpass}

map a network drive

net use z: \\servername\sharename /user:username
  1. mspaint

alt text

  1. msconfig :-System Configuration Utility alt text

3. ping ip address alt text


alt text

5.sshclient alt text

6.%temp% alt text


Command to abort the shutdown process.

c:\shutdown -a



The command



alt text


Date and Time

The command



alt text


Windows Security Center



alt text



Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name


-d                 Do not resolve addresses to hostnames.

-h maximum_hops    Maximum number of hops to search for target.

-j host-list       Loose source route along host-list.

-w timeout         Wait timeout milliseconds for each reply.

The items in the following list might be duplicates, but I just want to add it just in case (this is from a buddy's list). This might be more useful to an office worker than to a system administrator though:

  1. devmgmt.msc = Device Manager
  2. msinfo32 = System Information
  3. cleanmgr = Disk Cleanup
  4. ntbackup = Backup or Restore Wizard (Windows Backup Utility)
  5. mmc = Microsoft Management Console
  6. excel = Microsoft Excel (If Installed)
  7. msaccess = Microsoft Access (If Installed)
  8. powerpnt = Microsoft PowerPoint (If Installed)
  9. winword = Microsoft Word (If Installed)
  10. frontpg = Microsoft FrontPage (If Installed)
  11. notepad = Notepad
  12. wordpad = WordPad
  13. calc = Calculator
  14. msmsgs = Windows Messenger
  15. mspaint = Microsoft Paint
  16. wmplayer = Windows Media Player
  17. rstrui = System Restore
  18. netscp6 = Netscape 6.x
  19. netscp = Netscape 7.x
  20. netscape = Netscape 4.x
  21. waol = America Online
  22. control = Opens the Control Panel
  23. control printers = Opens the Printers Dialog

pathping - a traceroute that collects detailed packet loss statistics.



Very often would I see the system being plagued by trojans/worms that attempt to lock down every way of getting through to system internals like regedit, mmc, cmd.exe, etc. Then you have no choice, but to boot from a live CD. But, obviously, with at your disposal you can do anything you want, and I've yet to see THAT made unavailable.


Get the current day, month and year into environment variables (adjust for locale).

Command line:

for /f "tokens=2,3,4 delims=/ " %a in ('echo %date%') do set mon=%a && set day=%b && set year=%c

Or in a batch file:

for /f "tokens=2,3,4 delims=/ " %%a in ('echo %date%') do set mon=%%a && set day=%%b && set year=%%c

Other stuff

ipconfig /displaydns

WMIC - command line access to WMI

dsqery, dsget, dsmod, dsadd - command line access to AD

net localgroup

for /f %%a (' some command ') do call :sub %%a

Use :: instead of REM in batch files.


NTRIGHTS.EXE grant sePriveleges

Set /P for prompting.

IF ELSE in batch:

IF EXIST filename. (
    del filename.
) ELSE (
    echo filename. missing.
Thanks for ipocnfig /displaydns, I did not know about that one. It seems like it could be useful. – railmeat Aug 11 '09 at 2:24


httpcfg [query | set | delete] iplisten [ip address]

to find out or change the IP addresses IIS is listening on

(If you want to run IIS and some other HTTP server on the same box and port with different IP addresses.)



While it's from Sysinternals, the sysinternals tools are so essential and commonly installed on servers they might as well be part of the OS.

psexec \\targetserver -w "d:\bin" "cmd" 

You now have an interactive shell on a remote computer. Enter "exit" to come back home. I will often use it to apply something to a group of servers as follows.

set srvs=server1 server2 server3 
set execthis=[something useful]
for %s IN (%srvs%) DO (
start psexec \%s -u domain\someUser -p superSecretOfCourse "cmd" "/C %execthis%" 

Here I show several handy tricks:

  1. Use for loops to execute a command multiple times (from batch use %%s instead of %s)
  2. Start to open a window in a new process - handy if each operations takes a few minutes.
  3. Psexec can use windows auth or a login. Noting that integrated auth usually won't hop from local to server to a third location (e.g. SAN) - provide user and password if you need to access a network resource
bootsect.exe {/help | /nt52 | /nt60} {SYS | ALL | <DriveLetter:>} [/force]

From Bootsect Command-Line Options:

Bootsect.exe updates the master boot code for hard disk partitions to switch between BOOTMGR and NTLDR. You can use this tool to restore the boot sector on your computer.

Mind you that this tool is only available on the Windows installation DVD under the BOOT folder. (I think only Windows Vista or higher.)


print %logonserver%

A very quick and easy way to view the DC that your workstation has authenticated against. Useful when working with GPO's and scripts.

PRINT? Not ECHO? – jscott Dec 11 '11 at 15:24
Disk Management

enter image description here

Keyboard Properties
control keyboard

enter image description here

Regional and Language Options

enter image description here

Internet Properties

enter image description here


It is always fun to create a macro that performs a quick and unconditional format of a disk:

doskey cd=format $1 /q /u

Then to format a disk in drive A type:

cd A:
Shame they dropped the format's /autotest parameter. ;) – macbirdie May 6 '09 at 6:55

protected by Iain Dec 11 '11 at 14:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.