»   »   »

Windows XP/2003 Command-Line Reference

Prelude

To get more information on each of these commands type: command /?.

Some command-line tools require the user to have administrator-level privileges on source and/or target computers.

I mostly use these commands (along with those I installed along with Cygwin) to administer my pc remotely via ssh; I wrote a document on this here.

This is a condensed list partly collected from here.

Commands/Tools

arp : Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP).

assoc : Displays or modifies file extension associations.

at : The AT command schedules commands and programs to run on a computer at a specified time and date. The Schedule service must be running to use the AT command.

atmadm : Windows ATM Call Manager Statistics.

attrib : displays or changes file attributes.

bootcfg : configure, query, change or delete the boot entry settings in the BOOT.INI file.

break : Sets or Clears Extended CTRL+C checking on DOS system.

cacls : Displays or modifies access control lists (ACLs) of files.

call : calls one batch program from another.

chcp : displays or sets the active code page number.

chdir : displays the name of or changes the current directory.

chkdsk : checks a disk and displays a status report; chkdsk c: (checks for errors), chkdsk /f c: (checks for, and fixes corrupt files).

chkntfs : displays or modifies the checking of disk at boot time.

cipher : displays or modifies the checking of disk at boot time.

cls : clears the screen;

cmd : opens a new command window.

cmstp : connection manager profile installer (requires a GUI).

color : displays or modifies the checking of disk at boot time; color fc (light red on bright white).

comp : compares the contents of two files or sets of files.

compact : displays or alters the compression of files on NTFS partitions.

convert : converts FAT volumes to NTFS.

copy : copies a file; copy file1.txt file2.txt.

date : displays or sets the date.

defrag : defragments a disk; defrag c:

del : deletes a file.

dir : file listing.

diskcomp : compares the contents of two floppy disks.

diskcopy : compares the contents of two floppy disks.

diskpart : enables you to manage objects (disks, partitions, or volumes).

doskey : edits command lines, recalls Windows XP commands, and creates macros.

driverquery : Enables an administrator to enumerate and display the list of installed device drivers as well as their properties; driverquery.

echo : displays messages, or turns command-echoing on or off; echo hello world

endlocal : ends localization of environment changes in a batch file. Environment changes made after ENDLOCAL has been issued are not local to the batch file; the previous settings are not restored on termination of the batch file.

eventcreate : enables an administrator to create a custom event ID and message in a specified event log.

eventtriggers : enables an administrator to display and configure "Event Triggers" on local or remote system.

exit : quits the command window or the current batch script.

expand : expands one or more compressed files. This command is used to retrieve compressed files from distribution disks.

fc : compares two files or sets of files and displays the differences between them.

find : searches for a specific string of text in a file or files. After searching the specified file or files, find displays any lines of text that contain the specified string.

findstr : searches for strings in files.

finger : collects information.

for : runs a specified command for each file in a set of files.

format : formats a disk for use with Windows XP.

fsutil : file system utility.

ftp : file transfer protocol; ftp username@url.com.

fFtype : displays or modifies file types used in file extension associations

getmac : enables an administrator to display the MAC address for one or more network adapters on a system.

goto : directs cmd.exe to a labeled line in a batch program.

gpupdate : refreshes Group Policies settings.

graftabl : enable Windows to display an extended character set in graphics mode.

help : provides help information for Windows XP commands.

ipconfig : network configuration; ipconfig release (release ip address), ipconfig renew get a new ip address.

ipxroute : routing and Source Routing Control

label : creates, changes, or deletes the volume label of a disk.

lodctr : updates Performance Monitor counter names and explain text for an extensible counter

logman : manages the "Performance Logs and Alerts" service for creating and managing Event Trace Session logs and Performance logs.

lpq : displays the state of a remote lpd queue.

lpr : sends a print job to a network printer.

mkdir (md) : creates a directory.

mmc : Microsoft Management Console (a GUI app.).

mode : configure system devices.

more : displays one screen of output at a time; type filename.txt | more

mountvol : creates, deletes, or lists a volume mount point.

move : moves files and renames files and directories.

msconfig : NOTE: This is a GUI application; Allows easy configuration of startup files boot options etc.

msiexec : Windows installer (GUI app.).

net : network commands, there are several, net help (gives the options), net use s: \\ComputerName\ShareName (map a drive) or for a more complete example: net use n: \\ComputerName\ShareName /USER:domainname\username password, net share (view all shares), net view (lists computers, or resources being shared on domain)

netsh : locally or remotely, display or modify the network configuration of a computer that is currently running.

netstat : displays NetBIOS over TCP/IP (NetBT) protocol statistics.

nslookup : displays information that you can use to diagnose Domain Name System (DNS) infrastructure.

ntsd : a debugging tool.

openfiles : enables an administrator to list or disconnect files and folders that have been opened on a system.

path : displays or sets a search path for executable files.

pathping : provides information about network latency and network loss at intermediate hops between a source and destination.

pause : suspends processing of a batch program and displays the message: "Press any key to continue . . ."

pentnt : reports on whether local computer exhibits Intel(tm) Pentium Floating Point Division Error

perfmon : performance monitor (a GUI app.).

ping : verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) Echo Request messages.

popd : changes the current directory to the directory stored by the pushd command.

print : prints a text file.

prompt : changes the Cmd.exe prompt; prompt $p$g

pushd : stores the current directory for use by the POPD command, then changes to the specified directory.

rasdial : starts a network connection by using a specified entry.

rcp : copies files to and from computer running the RCP service.

recover : recovers readable information from a bad or defective disk.

reg : console Registry Tool for Windows.

regsvr32 : registers DLL's (partial GUI app.).

relog : creates new performance logs.

rem : comment for batch files; rem This Is a Comment

rename : renames a file.

replace : replaces files.

rexec : runs commands on remote hosts running the REXEC service. Rexec authenticates the user name on the remote host before executing the specified command.

robocopy : Robust File Copy for Windows. Aside from its uses as a copy tool (robocopy /?), it's very useful to delete a folder when you get this error: "The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or renaming to shorter name(s) before attempting this operation." First create an empty directory, then use robocopy's mirror switch to overwrite the big directory with the empty one: robocopy /MIR e:\empty e:\BigDir

rmdir : deletes a directory.

route : manipulates network routing tables.

rsh : runs commands on remote hosts running the RSH service.

rsm : See Start->Help (search for "Using the command line for Removable Storage") for more details.

runas : run as another user or process.

sc : used for communicating with the NT Service Controller and services.

schtasks : enables an administrator to create, delete, query, change, run and end scheduled tasks on a local or remote system. Replaces AT.exe.

secedit : configures and analyzes system security by comparing your current configuration to at least one template (a partial GUI app.).

set : displays, sets, or removes cmd.exe environment variables.

setlocal : begins localization of environment changes in a batch file.

shift : changes the position of replaceable parameters in a batch file.

shutdown : shuts down or restarts the computer; shutdown -r (reboot), shutdown -s (shuts down).

sort : reads input, sorts data, and writes the results to the screen, to a file, or to another device.

start : starts a separate window and runs the default application associated with the file that followed the command; start somefile.txt (if the notepad program is associated with all .txt files, then notepad will open with file somefile.txt). Additional switches (used before the filename): /minimized or /m, /maximized or /max, /restored or /r, /wait or /w.

subst : associates a path with a drive letter.

systeminfo : shows basic system information.

sfc : scans all protected system files and replaces incorrect versions with correct Microsoft versions.

taskkill : kills a job running on machine

tasklist : lists jobs running on machine

tcmsetup : telephony client setup (a partial GUI app.).

telnet : remote terminal connection; telnet -l username hostname

tftp : Transfers files to and from a remote computer running the TFTP service.

time : displays or sets the system time.

title : sets the window title for the command prompt window; title My Command Window

tracerpt : processes binary Event Trace Session log files or real-time streams from instrumented Event Trace providers and creates a report or a text (CSV) file describing the events generated.

tracert : trace route.

tree : graphically displays the folder structure of a drive or path.

type : displays the contents of a text file or files; type filename.txt

typeperf : writes performance data to the command window or to a log file. To stop Typeperf, press CTRL+C.

unlodctr : removes counter names and explain text for the specified extensible counter.

ver : displays the Windows XP version.

verify : tells cmd.exe whether to verify that your files are written correctly to a disk.

vol : displays the disk volume label and serial number, if they exist; vol c:

vssadmin : volume Shadow Copy Service administrative command-line tool.

w32tm : display the current time zone settings.

wmic : Windows Management Instrumentation Command-line (WMIC), a command-line and scripting interface that simplifies the use of Windows Management Instrumentation (WMI) and systems managed through WMI. For example, type wmic and enter, and then type process

xcopy : copies files and directory trees.

© Roqet :: 2022-03-01 16:07:34