This appendix provides an alphabetic command reference of Windows commands. This list of commands is based on the commands supported by the Windows XP Professional and Home Edition operating systems. Some of the commands listed here will not be supported by other Windows operating systems. Each Windows command is briefly described, and its syntax is explained in detail. For additional information on these commands, refer to the help system provided by your version of Windows.
Append
Enables programs to open files located in different folders as if they were stored in the current folder.
Syntax
append [;] [[drive:]path[;...]] [/x:{on | off}][/path:{on | off}] [/e]
Parameters
Parameter |
Purpose |
---|---|
; |
Clears the list of appended folders. |
[drive:]path |
Sets the drive, path, and folder to be appended. |
/x:{on | off} |
Determines whether the MS-DOS subsystem searches appended folders when running programs. With /x:on the program performs the search, and with /x:off the program does not. |
/path:{on | off} |
Determines whether a program should search appended folders, even when a path is provided along with the name of the file that the program is looking for. /path:on is the default. |
/e |
Creates an environment variable named APPEND and sets its value equal to the list of appended folders. The /e switch can only be used once after each time you restart your system. |
Arp
A TCP/IP protocol command that displays and modifies the IP-to-MAC address translation tables used by the ARP (Address Resolution Protocol).
Syntax
arp -a [inet_addr] [-N [if_addr]] arp -d inet_addr [if_addr] arp - g [-N [if_addr]] arp -s inet_addr ether_addr [if_addr]
Parameters
Parameter |
Purpose |
---|---|
-a |
Lists ARP entries. |
-g |
Lists ARP entries in the same manner as -a. |
[inet_addr] |
Identifies an IP address. |
-N |
Lists ARP entries for the network interface specified by if_addr. |
[if_addr] |
Identifies the IP address of the network interface whose address translation table should be modified. Otherwise, the first applicable interface will be used. |
-d |
Removes the entry specified by inet_addr. |
-s |
Adds a permanent entry in the ARP cache which associates the inet_addr IP address with the ether_addr MAC address. |
ether_addr |
Specifies a MAC address. |
Assoc
Lists or changes file extension associations.
Syntax
assoc [.ext[=[filetype]]]
Parameters
Parameter |
Purpose |
---|---|
None |
Lists current file associations. |
.ext |
Specifies a specific file extension to list or modify. |
[filetype] |
Identifies a file type to be associated with the specified file extension. |
At
Displays a listing of scheduled tasks (command, script, or program) and schedules the execution of new tasks.
Syntax
at [\computername] [[id] [/delete] | /delete [/yes]] at [\computername] time [/interactive] [/every:date[,...] | /next:date[,...]] command
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a listing of all scheduled tasks. |
[\computername] |
Specifies a remote computer where the task is to be executed. If omitted, the command is scheduled locally. |
Id |
Identifies the ID number assigned to a scheduled command. |
[/delete] |
Terminates a scheduled command. If id is not present, all scheduled tasks are terminated. |
[/yes] |
Requires a confirmation before terminating a scheduled task. |
time |
Identifies the time to execute the task expressed as hh:mm on a 24-hour clock. |
[/interactive] |
Permits interaction with the desktop and the logged on user. |
/every:date[,…] |
Establishes a schedule for task execution based on specified days of the week or month. The date is specified as M, T, W, Th, F, S, Su or 1–31. Multiple dates are separated by commas. If omitted, the schedule is set to the current day. |
/next:date[,…] |
Runs the task on the next occurrence of the day (M, T, W, Th, F, S, Su) or date (1–31). Multiple dates are separated by commas. If omitted, the schedule is set to the current day. |
command |
Specifies the task to execute. |
Atmadm
Monitors connections and addresses and displays statistics for ATM (asynchronous transfer mode) networks.
Syntax
atmadm [-c][-a] [-s]
Parameters
Parameter |
Purpose |
---|---|
[-c] |
Lists information about the computer's established connections to the ATM network. |
[-a] |
Displays the registered ATM network service access point address for each ATM network interface on the computer. |
[-s] |
Provides statistical data for active ATM connections. |
Attrib
Lists or modifies file attributes.
Syntax
attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [[drive:][path] filename] [/s[/d]]
Parameters
Parameter |
Purpose |
---|---|
[+r] |
Specifies the read-only attribute. |
[-r] |
Clears the read-only attribute. |
[+a] |
Specifies the archive attribute. |
[-a] |
Clears the archive attribute. |
[+s] |
Identifies the file as a system file. |
[-s] |
Clears the system file attribute. |
[+h] |
Specifies the hidden file attribute. |
[-h] |
Clears the hidden file attribute. |
[[drive:][path] filename] |
Sets the drive, path, and file name to be processed. |
[/s] |
Applies changes to matching files in the current directory and all subdirectories. |
[/d] |
Processes directories. |
Cacls
Displays or changes file ACLs (access control lists).
Syntax
cacls filename [/t] [/e] [/c] [/g user:perm] [/r user [...]] [/p user:perm [...]] [/d user [...]]
Parameters
Parameter |
Purpose |
||||||
---|---|---|---|---|---|---|---|
filename |
Displays a specified file's ACLs. |
||||||
[/t] |
Modifies the ACLs of specified files in the directory and its subdirectories. |
||||||
[/e] |
Edits an ACL rather than replacing it. |
||||||
[/c] |
Makes changes regardless of errors. |
||||||
[/g user:perm] |
|
||||||
[/r user] |
Removes user access rights. |
||||||
[/p user:perm] |
|
||||||
[/d user] |
Denies user access. |
Call
Calls a label or another script for execution as a procedure.
Syntax
call [drive:][path] filename [batch-parameters] call :label [arguments]
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Sets the location and name of the script. |
[batch-parameters] |
Identifies the command-line information to be passed to the script. |
label |
Specifies a label within the script to jump. |
Chcp
Displays or modifies the active console code page number.
Syntax
chcp [nnn]
Parameters
Parameter |
Purpose |
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
None |
Displays the active console code page number. |
||||||||||||||||||||||||
[nnn] |
|
Chdir (Cd)
Displays the current directory name or changes the current directory.
Syntax
chdir [/d] [drive:][path] [..] cd [/d] [drive:][path] [..]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the names of the current drive and directory. |
[/d] |
Changes the current drive and directory. |
[drive:][path] |
Changes to a specified drive and directory. |
[..] |
Changes the current directory to the parent directory. |
Chkdsk
Displays disk status and corrects errors found on the specified disk.
Syntax
chkdsk [drive:][[path] filename] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:size]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays disk status for the current drive. |
[drive:] |
Specifies the drive to be checked. |
[path] filename |
Specifies files to be checked for fragmentation. |
[/f] |
Repairs disk errors. |
[/v] |
Displays the name of each file that is processed. |
[/r] |
Finds bad sectors and attempts to recover lost data. |
[/x] |
NTFS only. Forces the volume dismount on NTFS volumes. |
[/i] |
NTFS only. Speeds up chkdsk by performing a less extensive check on NTFS volumes. |
[/c] |
NTFS only. Eliminates the checking of cycles inside folders on NTFS volumes. |
/l[:size] |
NTFS only. Displays or changes log file size on NTFS volumes. |
Chkntfs
Displays or schedules the automatic system checking on FAT, FAT32, or NTFS volumes during system initialization.
Syntax
chkntfs volume: [...] chkntfs [/d] chkntfs [/t[:time]] chkntfs [/x volume: [...]] chkntfs [/c volume: [...]]
Parameters
Parameter |
Purpose |
---|---|
volume: |
Displays file system type of the specified volume. |
/d |
Restores default settings. |
[/t] |
Displays or modifies remaining time for automatic file checking. |
[/x] |
Prevents a specified volume from being checked during system initialization. |
[/c] |
Specifies that the volume be checked during system initialization. |
Cipher
Displays or modifies folder and file encryption on NTFS volumes.
Syntax
cipher [/e| /d] [/s:dir] [/a] [/i] [/f] [/q] [/h] [/k] [/u] [/n] [pathname [...]] | [/r:pathnamewithnoextn] | [/w:pathname]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the current encryption status of the current folder and its contents. |
[/e] |
Encrypts the specified folders and turns on encryption for any files that may later be added to the folder. |
[/d] |
Decrypts the specified folders and turns off encryption for any files that may later be added to the folder. |
[/s: dir] |
Performs the specified operation on all folders and subfolders in the specified folder. |
[/a] |
Performs the specified operation on all specified files. |
[/i] |
Performs the specified operation even if errors occur. |
[/f] |
Encrypts or decrypts all specified objects regardless of their current encryption status. |
[/q] |
Limits reporting to essential information only. |
[/h] |
Displays files with hidden or system attributes. |
[/k] |
Creates a new encryption key. |
[/u] |
Updates the encryption key. |
[/n] |
Prevents the updating of the encryption key. |
[pathname] |
Sets a folder, file, or pattern. |
[/r:pathnamewithnoextn] |
Creates a new recovery agent certificate and a new private key. |
Cls
Clears the command console screen and displays the command prompt and cursor.
Syntax
cls
Cmd
Starts a new instance of the Windows shell.
Syntax
cmd [ [/c | /k] [/s] [/q] [/d] [/a | /u] [/t:fg] [/e: on | off] [/f: on | off] [/v: on | off] string]
Parameters
Parameter |
Purpose |
---|---|
[/c] |
Exits the shell after executing the specified command. |
[/k] |
Executes the specified command and continues. |
[/q] |
Disables echoing. |
[/d] |
Prevents the execution of AutoRun commands. |
[/a] |
Formats output as ANSI characters. |
[/u] |
Formats output as Unicode characters. |
[/t:fg] |
Specifies foreground and background colors. |
[/e: on | off] |
Turns on support for command extensions. |
[/f: on | off] |
Turns on file and directory name completion. |
[/v: on | off] |
Turns on support for delayed variable expansion. |
[string] |
Sets the command to be executed. |
Color
Sets console foreground and background colors. Returns ERRORLEVEL 1 if you try to set the foreground and background colors to the same value.
Syntax
color fb
Parameters
Parameter |
Purpose |
---|---|
none |
Restores default colors. |
f |
Sets the foreground color based on a hexadecimal value. |
b |
Sets the background color based on a hexadecimal value. Hexadecimal color assignments include: 0 Black 1 Blue 2 Green 3 Aqua 4 Red 5 Purple 6 Yellow 7 White 8 Gray 9 Light blue A Light green B Light aqua C Light red D Light purple E Light yellow F Bright white |
Comp
Performs a comparison of two files or two sets of files on a byte-by-byte basis.
Syntax
comp [data1] [data2] [/d] [/a] [/l] [/n=number] [/c]
Parameters
Parameter |
Purpose |
---|---|
[data1] |
Sets the path and file name of the first file or set of files. |
[data2] |
Sets the path and file name of the second file or set of files. |
[/d] |
Displays any differences using a decimal format. |
[/a] |
Displays any differences in character format. |
[/l] |
Displays line numbers where differences occur. |
[/n=number] |
Compares the specified number of lines in both files. |
[/c] |
Performs a case-insensitive comparison. |
Compact
Displays and changes compression settings for files and folders on NTFS partitions.
Syntax
compact [/c|/u] [/s[:dir]] [/a] [/i] [/f] [/q] [filename[...]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays information on the compression state for the current folder. |
[/c] |
Compresses the folder or file. |
[/u] |
Uncompresses the folder or file. |
[/s:dir] |
Specifies that all subfolders should be processed. |
[/a] |
Displays hidden or system files. |
[/i] |
Specifies that errors should be ignored. |
[/f] |
Forces the compression or uncompression of the folder or file. |
[/q] |
Limits reporting to essential information only. |
[filename] |
Sets the file or directory. |
Convert
Converts FAT and FAT32 volumes to NTFS volumes.
Syntax
convert [volume] /fs:ntfs [/v] [/cvtarea:filename] [/nosecurity] [/x]
Parameters
Parameter |
Purpose |
---|---|
volume |
Identifies the driver letter to be converted. |
/fs:ntfs |
Converts the volume. |
[/v] |
Turns on verbose messaging. |
[/cvtarea:filename] |
Specifies that the Master File table is to be written to an existing placeholder. |
[/nosecurity] |
Makes converted files and folders accessible to everyone. |
[/x] |
Dismounts the volume before converting. |
Copy
Copies one or more files.
Syntax
copy [/d] [/v] [/n] [/y | /-y] [/z] [/a | /b] source [/a | /b] [+ source [/a | /b] [+ ...]] [destination [/a | /b]
Parameters
Parameter |
Purpose |
---|---|
[/d] |
Permits encrypted files to be copied and saved as decrypted files. |
[/v] |
Verifies the success of the copy operation. |
[/n] |
Uses a short file name as the destination file's new file name. |
[/y] |
Suppresses any confirmation prompts. |
[/-y] |
Displays confirmation prompts. |
[/z] |
Turns on a restartable mode before copying network files so that if network connectivity is lost, the copy operation will resume when connectivity is re-established. |
[/a] |
Identifies the file as an ASCII text file. |
[/b] |
Identifies the file as a binary file. |
source |
Specifies the file name of a file or set of files to be copied. |
destination |
Specifies the name and destination where the file is to be copied. |
Country
Configures the MS-DOS subsystem so that it can use international dates, time, currency, case conversions, and decimal separators.
Syntax
country=xxx[,[yyy][,[drive:][path] filename]]
Parameters
Parameter |
Purpose |
---|---|
xxx |
Identifies the Country/Region code. |
[yyy] |
Identifies the Country/Region code page. |
[drive:][path] filename |
Sets the drive, path, and file name of the file that contains the Country/Region information. |
Cprofile
Removes unnecessarily used space from profiles.
Syntax
cprofile [/l] [/i] [/v] [filelist] cprofile [/ii] [/v] [filelist]
Parameters
Parameter |
Purpose |
---|---|
[/l] |
Cleans local profiles. |
[/i] |
Prompts before processing each profile. |
[/v] |
Displays detailed information about each action that is performed. |
[filelist] |
Displays a list of files from which user-specific file associations are removed. |
Date
Displays or changes the current date.
Syntax
date [mm-dd-yy] date [/t]
Parameters
Parameter |
Purpose |
---|---|
[mm-dd-yy] |
Specifies the date. mm must be 1–12 dd must be 1–31 yy must be 80–99 or 1980–2099 |
[/t] |
Displays the date without prompting for a date change. |
Debug
Starts the Debug program used to test MS-DOS executables.
Syntax
debug [[drive:][path] filename [parameters]]
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Specifies the drive, path, and file name of the executable file to text. |
[parameters] |
Command-line parameters required by the executable file. |
Defrag
Reorganizes data stores on local volumes to improve storage and retrieval time.
Syntax
defrag volume [/a] defrag volume [/a] [/v] defrag volume [/v] defrag volume [/f]
Parameters
Parameter |
Purpose |
---|---|
volume |
The driver letter to be defragmented. |
[/a] |
Displays an analysis report. |
[/v] |
Displays a verbose analysis. |
[/f] |
Forces defragmentation. |
Del (Erase)
Deletes a file.
Syntax
del [drive:][path] filename [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]] erase [drive:][path] filename [ ...] [/p] [/f] [/s] [/q] [/a[:attributes]]
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Specifies the drive, path, and file name of the files to delete. |
[/p] |
Prompts for confirmation. |
[/f] |
Deletes read-only files. |
[/s] |
Deletes files in the current folder and its subfolders. |
[/q] |
Suppresses the confirmation prompts. |
[/a] |
Deletes files based on file attributes. |
Dir
Displays a directory file listing.
Syntax
dir [drive:][path][filename] [...] [/p] [/q] [/w] [/d] [/a[[:]attributes]][/o[[:]sortorder]] [/t[[:]timefield]] [/s] [/b] [/l] [/n] [/x] [/c] [/4]
Parameters
Parameter |
Purpose |
||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
None |
Displays the disk's volume label, serial number, and a listing of its contents. |
||||||||||||||||||||||
[drive:][path] |
Specifies the drive and path for the folder to be displayed. |
||||||||||||||||||||||
[filename] |
Specifies a particular file to be displayed. |
||||||||||||||||||||||
[/p] |
Displays data a screen at a time. |
||||||||||||||||||||||
[/q] |
Displays information about file ownership. |
||||||||||||||||||||||
[/w] |
Displays the folder listing in multiple columns. |
||||||||||||||||||||||
[/d] |
Same as /w but sorts files by column. |
||||||||||||||||||||||
/a[[:] attributes] |
|
||||||||||||||||||||||
/o [[:]sortorder] |
|
||||||||||||||||||||||
/t [[:]timefield] |
|
||||||||||||||||||||||
[/s] |
Lists every occurrence of the specified file name. |
||||||||||||||||||||||
[/b] |
Lists each directory or file name. |
||||||||||||||||||||||
[/l] |
Displays unsorted lowercase folder and file names. |
||||||||||||||||||||||
[/n] |
Displays a long list format. |
||||||||||||||||||||||
[/x] |
Displays the short names. |
||||||||||||||||||||||
[/c] |
Displays the thousand separator (comma) when showing file sizes. |
||||||||||||||||||||||
[/4] |
Displays the date in a four-digit year format. |
Diskcomp
Compares the contents of two floppy disks.
Syntax
diskcomp [drive1: [drive2:]]
Parameters
Parameter |
Purpose |
---|---|
[drive1] |
Identifies the location of the first disk. |
[drive2] |
Identifies the location of the second disk. |
Diskcopy
Copies the contents of a source disk to a destination disk.
Syntax
diskcopy [drive1: [drive2:]] [/v]
Parameters
Parameter |
Purpose |
---|---|
[drive1] |
Identifies the location of the source disk. |
[drive2] |
Identifies the location of the destination disk. |
[/v] |
Verifies a successful copy operation. |
Diskperf
Specifies the types of counters that can be used with the System Monitor.
Syntax
diskperf [-y[d|v]|-n[d|v] [\computername]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the status of performance counters. |
[-y] |
Specifies that the physical and logical disk performance counters should be started at system initialization. |
[-yd] |
Enables disk performance counters for physical drives at system initialization. |
[-yv] |
Enables disk performance counters for logical drives at system initialization. |
[-n] |
Prevents disk performance counters from starting at system initialization. |
[-nd] |
Disables physical drive disk performance counters at system initialization. |
[-nv] |
Disables logical drive disk performance counters at system initialization. |
[\computername] |
Allows you to specify a network computer for viewing. |
Doskey
Executes the Doskey program, which recalls commands and creates macros.
Syntax
doskey [/reinstall] | [/listsize=size] | [/macros:[all | exename]] | [/history] | [/insert|] | [/overstrike] | [/exename=exename] | [/macrofile=filename] | [macroname=[text]]
Parameters
Parameter |
Purpose |
---|---|
[/reinstall] |
Installs a new copy of Doskey. |
[/listsize=size] |
Sets the maximum number of commands contained in the history buffer. |
[/macros] |
Displays macros. |
[all] |
Displays macros for all executables. |
[exename] |
Displays the specified executable's macro. |
[/history] |
Displays commands currently stored in memory. |
[/insert | /overstrike] |
Specifies the insert mode. |
[/exename=exename] |
Identifies the program that will run the macro. |
[/macrofile=filename] |
Identifies the file that contains macros to be installed. |
[macroname=[text]] |
Creates a macro and assigns the commands set by text. |
Dosonly
Prevents non-MS-DOS applications from being executed at COMMAND.COM.
Syntax
Dosonly
Driverquery
Displays device driver information.
Syntax
driverquery [/s computer] [/u domainuser /p password] [/fo table | list | csv] [/nh] [/v] [/si]
Parameters
Parameter |
Purpose |
---|---|
[/s computer] |
Identifies the name of the computer or its IP address. |
[/u domainuser /p password] |
Executes the command using the supplied user's permissions. |
[/fo table|list|csv] |
Specifies the format in which returned results are to be displayed. |
[/nh] |
Prevents the displays of the heading when used with the /fo table option. |
[/v] |
Displays detailed information about drivers. |
[/si] |
Displays digital signature information. |
Echo
Displays a message or enables and disables command echoing.
Syntax
echo [on | off] [message]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the current echo setting. |
on | off |
Turns command echoing on or off. |
[message] |
Specifies text to be displayed. |
Echoconfig
Displays messages when processing the MS-DOS subsystem CONFIG.NT and AUTOEXEC.NT files during the initialization of the MS-DOS subsystem.
Syntax
echoconfig
Edit
Starts the MS-DOS editor.
Syntax
edit [[drive:][path] filename] [/b] [/g] [/h] [/nohi]
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Specifies the drive, path, and file name of a text file and creates it if it does not exist. |
[/b] |
Displays the MS-DOS editor with a black background and white foreground. |
[/g] |
Speeds up screen updating on a CGA monitor. |
[/h] |
Displays the number of lines that can be displayed on the monitor. |
[/nohi] |
Changes from a 16-color to an 8-color scheme. |
Edlin
Starts a line-oriented ASCII text editor.
Syntax
edlin [drive:][path] filename [/b]
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Specifies the drive, path, and file name of an ASCII file. |
[/b] |
Instructs edlin to ignore the end-of-file characters. |
Endlocal
Ends localization of environment changes in a script and restores environment variables to their previous values.
Syntax
Endlocal
Evntcmd
Displays SNMP (Simple Network Management Protocol) events.
Syntax
evntcmd [/s sysname][/v number] [/n] filename
Parameters
Parameter |
Purpose |
---|---|
[/s sysname] |
Sets the target system name. |
[/v number] |
Sets the level of messaging: 0=none; 10=detailed. |
[/n] |
Prevents the restart of the SNMP service when trap changes are received. |
filename |
Identifies a configuration file with information about which vent to trap. |
Evntcreate
Provides administrators with the ability to post events to event logs.
Syntax
eventcreate [/s computer [/u domainuser [/p passwd]] [/l application | system] | [/so srcname] [/t error | warning | information | successaudit | failureaudit] [/id event] [/d description]
Parameters
Parameter |
Purpose |
---|---|
[/s] |
Specifies the name of the target computer. |
[/u] |
Executes the command using the permission assigned to the specified user. |
[/p] |
Specifies the user's password. |
[/l application | system] |
Specifies the target event log. |
[/so srcname] |
Sets the event source. |
[/t error | warning | information | successaudit | failureaudit] |
Identifies the event type. |
[/id event] |
Sets the event type (between 1–65535). |
[/d description] |
Specifies an event description. |
Evntquery
Displays events stored in event logs.
Syntax
Eventcreate[.vbs] [/s computer [/u domainuser [/p passwd]] [/fi filter] [/fo table | list | csv] [/r evtrange] [/nh] [/v] [/l [application] | [system] | [security] ["DNS server"] [userlog] [dirlogname] [*]]
Parameters
Parameter |
Purpose |
---|---|
[/s] |
Specifies the name of the target computer. |
[/u] |
Executes the command using the permission assigned to the specified user. |
[/p] |
Specifies the user's password. |
[/fi filter] |
Identifies the events to be included. |
[/fo table | list | csv] |
Specifies the format for the command output. |
[/r evtrange] |
Specifies the range of events to be displayed. N lists the n most recent events in the log. -n lists the n oldest event in the log. n1–n2 list the events in the specified range. |
[/nh] |
Suppresses the display of column headers. |
[/v] |
Specifies verbose output. |
[/l application | system | security] |
Specifies the target event log. |
["DNS server"] |
Can be specified only if DNS is active on the target computer. |
[userlog] |
A user-defined log to be processed. |
[dirlogname] |
A directory log to be processed. |
[*] |
Specifies all logs. |
Exit
Terminates a Windows shell session.
Syntax
exit [/b] [exitcode]
Parameters
Parameter |
Purpose |
---|---|
[/br] |
Exits the currently processing batch file. |
exitcode |
Sets an exit code number. |
Expand
Uncompresses compressed files from distribution disks.
Syntax
expand [-r] source [destination] expand -d source.cab [-f:files] expand source.cab -f:files destination
Parameters
Parameter |
Purpose |
---|---|
[-r] |
Renames files as it expands them. |
-d |
Displays the list of files at the specified source location. |
[-f:files] |
Specifies the files in a .CAB file that are to be expanded. |
[destination] |
Specifies the location where files are to be expanded. |
Fc
Compares two files and reports on their differences.
Syntax
fc [/a] [/b] [/c] [/l] [/lbn] [/n] [/t] [/u] [/w] [/nnnn] [drive1:][path1]filename1 [drive2:][path2]filename2
Parameters
Parameter |
Purpose |
---|---|
[/a] |
Displays the first and last lines for each set of differences. |
[/b] |
Performs a comparison of the files in binary mode. |
[/c] |
Ignores differences in case. |
[/l] |
Performs a comparison of the files in ASCII mode. |
[/lbn] |
Specifies the number of lines used by the internal line buffer. This value must be greater than or equal to the number of differing lines in the files being compared. |
[/n] |
Displays the line numbers. |
[/t] |
Prevents the expansion of tabs into spaces. |
[/u] |
Performs a comparison of the files as Unicode text files. |
[/w] |
Compresses white space during the comparison. |
[/nnnn] |
Sets the number of consecutive lines that must be matched before the two files are identified as resynchronized. |
[drive1:][path1]filename1 |
Sets the drive, path, and file name of the first file. |
[drive2:][path2]filename2 |
Sets the drive, path, and file name of the second file. |
Fcbs
Sets a limit on the number of FCBs (file control blocks) that the MS-DOS subsystem accesses simultaneously.
Syntax
fcbs=x
Parameters
Parameter |
Purpose |
---|---|
x |
Sets the number of FCBs with a maximum setting of 255. |
Files
Limits the number of files that the MS-DOS subsystem can open at one time.
Syntax
files=x
Parameters
Parameter |
Purpose |
---|---|
x |
Sets the number of files with a maximum setting of 255. |
Find
Searches for a string of text in a file and displays any matches.
Syntax
find [/v] [/c] [/n] [/i] "string" [[drive:][path]filename[...]]
Parameters
Parameter |
Purpose |
---|---|
[/v] |
Displays lines that do not match the string. |
[/c] |
Displays a count of matching lines. |
[/n] |
Displays a line before each line. |
[/i] |
Performs a case-insensitive search. |
"string" |
Specifies the string to search for. |
[drive:][path] filename |
Specifies the drive, path, and file name of the file to be searched. |
Findstr
Searches for strings in files using regular expressions.
Syntax
findstr [/b] [/e] [/l] [/r] [/s] [/i] [/x] [/v] [/n] [/m] [/o] [/p] [/offline] [/g:file] [/f:file] [/c:string] [/d:dirlist] [/a:color attribute] [strings] [[drive:][path] filename [...]]
Parameters
Parameter |
Purpose |
---|---|
[/b] |
Specifies that the match must occur at the beginning of a line. |
[/c: string] |
Uses the specified string as a literal search string. |
[/e] |
Specifies that the match must occur at the end of a line. |
[/l] |
Performs a literal search using the search string. |
[/r] |
Uses search strings as regular expressions. |
[/s] |
Searches for matches in the current folder and all subdirectories. |
[/I] |
Specifies a case-insensitive search. |
[/x] |
Prints lines that contain a match. |
[/v] |
Prints lines that do not contain a match. |
[/n] |
Prints the line number. |
[/m] |
Prints the file name where a match is found. |
[/o] |
Prints the seek offset before each match. |
[/p] |
Skips nonprintable characters. |
[offline] |
Causes a file with the offline attribute set to be processed. |
[/g file] |
Specifies a file that contains the search strings. |
[/f file] |
Specifies a file that contains a file list. |
[/d dirlist] |
Searches a comma-delimited list of folders. |
[/a color attribute] |
Specifies two-character hexadecimal color attributes. |
Finger
Displays user information on a specified system running the Finger service.
Syntax
finger [-l] [user]@computer [...]
Parameters
Parameter |
Purpose |
---|---|
[-l] |
Provides information using a long list format. |
[User] |
Specifies a user. If omitted, information about all users is displayed. |
@computer |
Specifies the computer where the information is to be collected. |
Flattemp
Enables or displays the use of flat temporary folders.
Syntax
flattemp [/query | /enable | /disable]
Parameters
Parameter |
Purpose |
---|---|
[/query] |
Displays the current setting for FLATTEMP. |
[/enable] |
Enables the use of temporary folders. |
[/disable] |
Disables the use of temporary folders. |
For
Executes a command for each file in a set of files.
Syntax
for %%variable in (set) do command [command-parameters]
Parameters
Parameter |
Purpose |
---|---|
%%variable |
Specifies a parameter that the for command replaces with each text string in the specified set until all files have been processed. |
(set) |
Specifies files or text strings to process. |
command |
Specifies the command to be executed in each file in the set. |
[command-parameters] |
Provides parameters to be used by the specified command. |
Forcedos
Starts a program using the MS-DOS subsystem.
Syntax
forcedos [/d directory] filename [parameters]
Parameters
Parameter |
Purpose |
---|---|
[/d directory] |
Sets the directory to be used by the specified program. |
filename |
Identifies the program to be started. |
[parameters] |
Provides parameters to be used by the specified program. |
Format
Formats a disk.
Syntax
format volume [/fs:file-system] [/v:label] [/q] [/a:unitsize] [/c] [/x] format volume [/v:label] [/q] [/f:size] format volume [/v:label] [/q] [/t:tracks /n:sectors] format volume [/v:label] [/q] format volume [/q]
Parameters
Parameter |
Purpose |
---|---|
volume: |
Sets the mount point, volume, or drive to be formatted. |
[/fs:file-system] |
Specifies one of the following file systems: FAT, FAT32, or NTFS. |
[/v:label] |
Sets the volume label. |
[/a:unitsize] |
Sets the allocation unit size to use on FAT, FAT32, or NTFS volumes. |
[/q] |
Performs a quick format. |
[/f:size] |
Specifies the size of the floppy disk. |
[/t:tracks] |
Specifies the number of tracks on the disk. |
[/n:sectors] |
Specifies the number of sectors per track. |
[/c] |
Specifies that files created on the new volume should be automatically compressed. |
[/x] |
Automatically dismounts a volume if required before formatting it. |
Ftp
Transfers files to and from a computer running an FTP service.
Syntax
ftp [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [computer]
Parameters
Parameter |
Purpose |
---|---|
[-v] |
Prevents the display of remote server messages. |
[-d] |
Enables debugging. |
[-i] |
Prevents interactive prompting for multiple file transfers. |
[-n] |
Suppresses autologin upon the initial connection. |
[-g] |
Permits the use of wildcard characters in local file and path names. |
[-s:filename] |
Identifies a text file containing FTP commands that should be automatically executed when the FTP session starts. |
[-a] |
Uses any local interface to bind data connection. |
[-w:windowsize] |
Changes the default transfer buffer size from 4096 to a new value. |
[-A] |
Logs on as anonymnous. |
[computer] |
Specifies a remote computer to connect to. |
Ftype
Displays or modifies file types used to associate file name extensions.
Syntax
Ftype [filetype[=[command]]]
Parameters
Parameter |
Purpose |
---|---|
[filetype] |
Specifies the file type you want to work with. |
[command] |
Specifies the open command that is used to open files of this type. |
Getmac
Displays the MAC (media access control) address of network devices and lists network protocols assigned to each address.
Syntax
Getmac[.exe] [/s computer [/u domainuser] [/p passwd]] [/fo [table | list | csv] [/nh] [/v]
Parameters
Parameter |
Purpose |
---|---|
[/s computer] |
Identifies the target computer by name or IP address. |
[/u domainuser] |
Executes the command using the supplied user's permissions. |
[/p password] |
Specifies the user's password. |
[/fo [table | list | csv] |
Specifies the format in which returned results are to be displayed. |
[/nh] |
Suppresses the display of column headers. |
[/v] |
Specifies verbose output. |
Goto
Instructs the shell to jump to a label in a script and begins processing commands starting with the next line.
Syntax
goto label
Parameters
Parameter |
Purpose |
---|---|
label |
Identifies the line in a script to which the shell should jump. |
Gpresult
Displays Group Policy settings and Resultant Set of Policy on the target computer.
Syntax
gpresult [/s computer] [/u domainuser /p password] [/user trgtusername] [/scope [user | computer]] [/v] [/z]
Parameters
Parameter |
Purpose |
---|---|
[/s computer] |
Identifies the target computer by name or IP address. |
[/u domainuser /p password] |
Executes the command using the supplied user's permissions. |
[/user trgtusername] |
Specifies the username whose Resultant Set of Policy is to be displayed. |
[/scope [user | computer]] |
Provides either computer or user data. |
[/v] |
Specifies verbose output. |
[/z] |
Specifies all available information. |
Gpupdate
Refreshes Group Policy settings.
Syntax
gpupdate [/target:computer | user] [/force] [/wait:x] [/logoff] [/boot]
Parameters
Parameter |
Purpose |
---|---|
[/target:computer | user] |
Specifies whether computer or user settings are processed. |
[/force] |
Applies all Group Policy settings. |
[/wait:x] |
Number of seconds to wait for the command to complete. 600 is default. |
[/logoff] |
Logs the user off after the command completes. |
[/boot] |
Restarts the computer after the command completes. |
Graftabl
Instructs Windows to display the extended characters from a specified code page in full screen mode.
Syntax
graftabl [xxx] [/status]
Parameters
Parameter |
Purpose |
---|---|
[xxx] |
Specifies the code page. Valid options are: 437 United States 850 Multilingual (Latin I) 852 Slavic (Latin II) 855 Cyrillic (Russian) 857 Turkish 860 Portuguese 861 Icelandic 863 Canadian-French 865 Nordic 866 Russian 869 Modern Greek |
[/status] |
Identifies the currently selected code page. |
Help
Provides online information about commands.
Syntax
help [command]
Parameters
Parameter |
Purpose |
---|---|
[command] |
Specifies the command. |
Helpctr
Opens the Help and Support Center.
Syntax
helpctr [/url [URL]] [/mode [URL]] [/hidden] [/fromstarthelp]
Parameters
Parameter |
Purpose |
---|---|
[/url [URL]] |
Specifies the URL to be loaded when the Help and Support Center starts. |
[/mode [URL]] |
Specifies an XML definition file that controls the layout and text of the Help and Control Center. |
[/hidden] |
Starts the Help and Control Center but does not display its interface. |
[/fromstarthelp] |
Starts a new instance of the Help and Support Center. |
Hostname
Displays the TCP/IP name of the computer.
Syntax
hostname
If
Supports conditional logic in scripts.
Syntax
if [not] errorlevel number command [else expression] if [not] string1==string2 command [else expression] if [not] exist filename command [else expression] if [/i] string1 compare-op string2 command [else expression] if cmdextversion number command [else expression] if defined variable command [else expression]
Parameters
Parameter |
Purpose |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
[not] |
Reverses the test condition. |
||||||||||||||
errorlevel number |
Sets a true condition if the previous program returned an exit code equal to or greater than number. |
||||||||||||||
command |
Identifies a command that the shell is to execute if the preceding condition is satisfied. |
||||||||||||||
string1==string2 |
Specifies a true condition when string1 and string2 are the same. |
||||||||||||||
exist filename |
Specifies a true condition when a filename exists. |
||||||||||||||
compare-op |
|
||||||||||||||
[/i] |
Forces case-insensitive string comparisons. |
||||||||||||||
cmdextversion number |
Compares the internal version number associated with CMD.EXE to the specified number. |
||||||||||||||
defined variable |
Returns true if the environment variable is defined. |
||||||||||||||
[else expression] |
Specifies the command and any parameters that need to be passed to the command. |
Ipconfig
A diagnostic command that displays and sets TCP/IP network configuration settings.
Syntax
ipconfig [/all [/renew [adapter]] [/release [adapter]] [/flushdns] [/displaydns] [/registerdns] [/showclassid adapter] [/setclassid adapter [classid]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the IP address, subnet mask, and default gateway for each network interface. |
[/all] |
Produces all available configuration information. |
[/renew [adapter]] |
Submits a request to renew the DHCP configuration parameters. |
[/release [adapter]] |
Discards the current DHCP configuration. |
[/flushdns] |
Clears and resets DNS client cache. |
[/displaydns] |
Displays DNS client cache. |
[/registerdns] |
Registers DNS names and IP addresses for the computer. |
[/showclassid adapter] |
Displays the DHCP class ID for the specified network adapter. |
[/setclassid adapter [classid]] |
Configures the DHCP class ID for the specified network adapter. |
Ipxroute
Displays and changes information about IPX (International Packet Exchange) routing tables.
Syntax
ipxroute servers [/type=x] ipxroute ripout network ipxroute resolve [guid | name] [guid | adapter] ipxroute board=x [def] [gbr] [mbr] [remove=xxxx] ipxroute config
Parameters
Parameter |
Purpose |
---|---|
servers [/type=x] |
Displays the SAP (Service Access Point) table. |
ripout network |
Determines whether network is accessible. |
resolve [guid | name] [guid | adapter] |
Resolves GUID to friendly name and vice versa. |
board=x |
Identifies the network adapter to be queried. |
[def] |
Transmits data packets using the ALL ROUTES broadcast. When a packet is sent to a unique MAC address that is not listed in the routing table, it is sent to SINGLE ROUTES broadcast. |
[gbr] |
Transmits data packets using the ALL ROUTES broadcast. When a packet is sent to the broadcast address 255, it is sent to the SINGLE ROUTES broadcast. |
[mbr] |
Transmits data packets using the ALL ROUTES broadcast. When a packet is sent to a multicast address, it is sent to the SINGLE ROUTES broadcast. |
[remove=xxxx] |
Removes the specified address from the routing table. |
config |
Displays information about all IPX bindings. |
Irftp
Sends and receives data over an infrared link.
Syntax
irftp [drive:][[path]filename] [/h] irftp /s
Parameters
Parameter |
Purpose |
---|---|
[drive:] [[path]filename] |
The drive, path, and file name to be transmitted. |
/h |
Specifies hidden mode, which prevents the display of the Wireless Link dialog box. |
/s |
Opens Wireless link properties. |
Label
Creates, deletes, or modifies a disk's volume label.
Syntax
label [drive:][label] label [/MP] [volume] [label]
Parameters
Parameter |
Purpose |
---|---|
none |
Instructs the shell to prompt you to change or delete the current label. |
[drive:] |
Specifies a disk. |
[label] |
Specifies a new volume label. |
[/MP] |
Specifies that the volume is a mount point or volume name. |
[volume] |
Sets the drive letter, volume name, or mount point. |
[label] |
Specifies a volume label. |
Loadfix
Loads a program above the first 64KB of conventional memory and executes it.
Syntax
loadfix [drive:][path] filename
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] |
Specifies the drive and path of the program. |
filename |
Specifies the program name. |
Lodctr
Registers Performance counters and text for services and drivers.
Syntax
lodctr [\computer] filename [/s:filename] [/r:filename]
Parameters
Parameter |
Purpose |
---|---|
[\computer] filename |
Registers the Performance counters located in filename on the specified target computer. |
[/s:filename] |
Saves Performance counter settings to filename. |
[/r:filename] |
Restores Performance counter settings from filename. |
Logman
Schedules performance counter and event trace log collections.
Syntax
logman [create [counter | trace] collection] [start collection] [stop collection] [delete collection] [query collection | providers] [update collection]
Parameters
Parameter |
Purpose |
---|---|
[create [counter | trace] collection] |
Creates collection queries or trace collections. |
[start collection] |
Starts the specified collection query. |
[stop collection] |
Stops the specified collection query. |
[delete collection] |
Deletes the specified collection query. |
[query collection | providers] |
Collection displays the specified collection's properties. Providers displays all registered providers. |
[update collection] |
Updates collection queries. |
Lpq
A diagnostic utility that provides status information about a print queue on a computer running the LPD server.
Syntax
lpq --S server --P printer [-l]
Parameters
Parameter |
Purpose |
---|---|
-S server |
Specifies the computer name. |
-P printer |
Specifies the printer name. |
[-l] |
Provides for a detailed status. |
Lpr
A utility used to submit a print file to a computer running an LPD server.
Syntax
lpr [-S server] --P printer [-C bannercontent] [-J jobname] [-o | -ol] filename
Parameters
Parameter |
Purpose |
---|---|
[-S server] |
Specifies the computer name or IP address of the computer where the printer is located. |
-P Printer |
Specifies the printer name. |
[-C bannercontent] |
Specifies banner page content to print. |
[-J jobname] |
Specifies the print job name. |
[-o | =ol] |
Specifies the file type. –o indicates a text file and –ol indicates a binary file. |
filename |
Specifies the file to be printed. |
Mem
Displays information about memory usage of programs loaded into memory in the MS-DOS subsystem.
Syntax
mem [/program|/debug|/classify]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the MS-DOS subsystem memory status. |
/program |
Displays the status of programs loaded into memory. This switch is mutually exclusive with the other switches. |
/debug |
Displays the status of currently loaded programs and internal drivers. This switch is mutually exclusive with the other switches. |
/classify |
Displays the status of programs loaded into conventional memory and the upper memory area. This switch is mutually exclusive with the other switches. |
Mkdir (md)
Creates a directory or subdirectory.
Syntax
mkdir [drive:]path md [drive:]path
Parameters
Parameter |
Purpose |
---|---|
[drive:] |
Specifies the drive where the new folder is to be created. |
path |
Specifies the folder's name and path. |
Mmc
Opens the MMC (Microsoft Management Console).
Syntax
mmc pathfilename.msc [/a] [/64] [/32]
Parameters
Parameter |
Purpose |
---|---|
pathfilename.msc |
Starts the MMC using an existing console. |
[/a] |
Opens an existing console in author mode. |
[/64] |
Opens the 64-bit MMC. |
[/32] |
Opens the 32-bit MMC. |
More
Displays output one screen at a time.
Syntax
command name | more [/c] [/p] [/s] [/tn] [+n] more [[/c] [/p] [/s] [/tn] [+n]] < [drive:] [path] filename more [/c] [/p] [/s] [/tn] [+n] [files]
Parameters
Parameter |
Purpose |
---|---|
[drive:] [path] filename |
Specifies a file to display. |
command name |
Specifies a command to execute and displays its output. |
[/c] |
Clears the screen. |
[/p] |
Expands form-feed characters. |
[/s] |
Removes multiple blank lines from the display. |
[/tn] |
Changes tabs to the specified number of spaces. |
[+n] |
Displays the file beginning on line n. |
[files] |
Specifies a collection of files to display. |
Mountvol
Creates, deletes, or displays a volume mount point.
Syntax
mountvol [drive:]path VolumeName mountvol [drive:]path /d mountvol [drive:]path /L mountvol drive: /s
Parameters
Parameter |
Purpose |
---|---|
[drive:]path |
Specifies an NTFS folder to contain the mount point. |
VolumeName |
Identifies the volume name that is the target of the mount point. |
/d |
Removes a volume mount point in the specified folder. |
/L |
Displays the mounted volume name in the specified folder. |
/s |
Mounts the EIF System Partition on the specified drive and an Itanium-based computer. |
Move
Moves one or more files from one location to another, deleting it from its original location.
Syntax
move [/y | /-y] [source] [target]
Parameters
Parameter |
Purpose |
---|---|
[/y] |
Suppresses confirmation prompts. |
[/-y] |
Enables confirmation prompts. |
[source] |
Specifies the location of the source files to be moved. |
[target] |
Specifies the destination location of the files. |
Msinfo32
Displays information about the operating system, software, and hardware.
Syntax
Msinfo32 [/pch] [/nfo filename] [/report filename] [/computer system] [/showcategories] [/category categoryID] [/categories categoryID]
Parameters
Parameter |
Purpose |
---|---|
[/pch] |
Displays results using a history view. |
[/nfo filename] |
Saves results as an .nfo file. |
[/report filename] |
Saves results as a .txt file. |
[/computer system] |
Starts the System Information utility on the target computer. |
[/showcategories] |
Starts the System Information utility on the target computer using all available category IDs. |
[/category categoryID] |
Starts the System Information utility on the target computer using the specified category ID. |
[/categories categoryID] |
Starts the System Information utility on the target computer using the specified category ID or category IDs. |
Nbtstat
Displays current TCP/IP connections and statistics using NetBIOS over TCP/IP.
Syntax
nbtstat [-a remotename] [-A IP address] [-c] [-n] [-r] [-R] [RR] [-s] [-S] [interval]
Parameters
Parameter |
Purpose |
---|---|
[-a remotename1] |
Displays a remote computer's name table using its name. |
[-A IP address] |
Displays a remote computer's name table using its IP address. |
[-c] |
Displays the contents of the NetBIOS name cache. |
[-n] |
Displays local NetBIOS names. |
[-r] |
Displays name-resolution statistics. |
[-R] |
Purges all names from the NetBIOS name cache and reloads the Lmhosts file. |
[RR] |
Releases and refreshes NetBIOS names. |
[-s] |
Attempts to display client and server sessions using hostnames. |
[-S] |
Displays client and server sessions in the form of IP addresses. |
[interval] |
Displays statistics at the specified interval (in seconds). |
Net accounts
Modifies the user accounts database and changes logon and password requirements.
Syntax
net accounts [/forcelogoff:{minutes | no}] [/minpwlen:length] [/maxpwage:[days | unlimited]] [/minpwage:days] [/uniquepw:number] [/domain] net accounts [/sync] [/domain]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays current domain, logon, and password settings. |
[/forcelogoff:{minutes | no}] |
Specifies a number of minutes to wait before terminating a user session with a server when the user's logon time expires. No prevents a forced logoff. |
[/minpwlen:length] |
Sets the minimum password length. |
[/maxpwage:[days | unlimited]] |
Sets a password expiration period. |
[/minpwage:days] |
Specifies a minimum number of days that must pass before users can change passwords. |
[/uniquepw:number] |
Establishes a password history requirement that prevents users from reusing a password for the specified number of times. |
[/domain] |
Specifies that the operation should occur on a domain controller instead of locally. |
[/sync] |
Causes the primary domain controller to synchronize with all the backup domain controllers. |
Net computer
Adds or deletes computer accounts in the domain database.
Syntax
net computer \computername [/add | /del]
Parameters
Parameter |
Purpose |
---|---|
\computername |
Specifies the computer to be added or deleted. |
[/add] |
Adds the computer. |
[/del] |
Deletes the computer. |
Net config
Displays and changes configurable active services.
Syntax
net config [server | workstation]
Parameters
Parameter |
Purpose |
---|---|
[server] |
Displays or changes the setting for the Server service. |
[workstation] |
Displays or changes the setting for the Workstation service. |
Net continue
Reactivates a suspended service.
Syntax
net continue service
Parameters
Parameter |
Purpose |
---|---|
service |
Sets the server to reactivate. |
Net file
Displays a list of all open shared files on a server and the number of file locks on each file.
Syntax
net file [id [/close]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of the open files on a server. |
id |
Identifies the number of the file. |
[/close] |
Closes an open file and releases any locked records. |
Net group
Adds, displays, or changes global groups on Windows domains.
Syntax
net group [groupname [/comment:"text"]] [/domain] net group groupname {/add [/comment:"text"] | /delete} [/domain] net group groupname username[ ...] {/add | /delete} [/domain]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of groups on the server. |
[groupname] |
Specifies a group name to add, expand, or delete. |
[/comment:"text"] |
Adds a comment for a new or existing group. |
[/domain] |
Performs the operation on the primary domain controller instead of locally. |
username[ …] |
Lists one or more usernames to be added or removed from a group. |
[/add] |
Adds a group or a username to a group. |
[/delete] |
Deletes a group or username from a group. |
Net help
Lists network commands for which help is available and provides help for specified network commands.
Syntax
net help [command]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of network commands and topics for which help is available. |
[command] |
Specifies a command to retrieve help for. |
{/help | /?} |
Displays syntax for the command. |
Net helpmsg
Provides help with Windows error messages.
Syntax
net helpmsg message#
Parameters
Parameter |
Purpose |
---|---|
message# |
Specifies the four-digit number of the error message. |
Net localgroup
Adds, displays, or modifies local groups.
Syntax
net localgroup [groupname [/comment:"text"]] [/domain] net localgroup groupname {/add [/comment:"text"] | /delete} [/domain] net localgroup groupname name [...] {/add | /delete} [/domain]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the name of the server and local groups on the server. |
[groupname] |
Specifies the name of the local group. |
[/comment:"text"] |
Adds or changes a comment for a new or existing group. |
[/domain] |
Performs the operation on the primary domain controller instead of locally. |
name [ …] |
Lists one or more usernames or group names to be added or removed from a local group. |
/add |
Adds either a username or a global group to a local group. |
/delete |
Removes a username or group name from a local group. |
Net name
Displays the list of computer names that will accept messages, or adds or removes a messaging name.
Syntax
net name [name [/add | /delete]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of names already in use. |
[name] |
Specifies a name to the computer. |
[/add] |
Adds a name to the computer. |
[/delete] |
Removes a name from the computer. |
Net pause
Pauses active services.
Syntax
net pause service
Parameters
Parameter |
Purpose |
---|---|
service |
Name of the service. |
Net print
Lists or manages print jobs and printer queues.
Syntax
net print \computernamesharename net print [\computername] job# [/hold | /release | /delete]
Parameters
Parameter |
Purpose |
---|---|
somputername |
Specifies the name of the computer that manages the printer queue. |
sharename |
Specifies the name of the printer queue. |
job# |
Specifies the ID number assigned to a print job. |
[/hold] |
Places a print job on hold. |
[/release] |
Releases a print job from a hold status. |
[/delete] |
Deletes a print job. |
Net send
Sends messages to users, computers, and messaging names.
Syntax
net send {name | * | /domain[:name] | /users} message
Parameters
Parameter |
Purpose |
---|---|
name |
Specifies a username, computer name, or messaging name. |
* |
Sends a message to all names in the domain or your workgroup. |
/domain[:name] |
If name is not specified, it sends the message to all the names in the domain. If name is specified, the message is sent to all the names in the specified domain or workgroup. |
/users |
Sends a message to all users currently connected to the server. |
message |
Specifies the message text. |
Net session
Lists or terminates sessions with clients connected to the computer.
Syntax
net session [\computername] [/delete]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays information about all active sessions. |
[\computername] |
Identifies a specific network computer. |
[/delete] |
Terminates a session with \computername and then closes all open files on the computer for the session. |
Net share
Creates, deletes, and displays shared resources.
Syntax
net share [sharename] net share [sharename=drive:path [/users:number | /unlimited] [/remark:"text"] [/cache: [manual | automatic | no]] net share [sharename [/users:number | unlimited] [/remark:"text"] "] [/cache: [manual | automatic | no]] net share [[sharename | drive:path] /delete]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays information about all resources that are currently shared on the computer. |
sharename |
Specifies the name assigned to the shared resource. |
drive:path |
Specifies the absolute path of the folder to be shared. |
/users:number |
Limits the maximum number of users who can simultaneously access the share. |
/unlimited |
Allows unlimited simultaneous access to the share. |
/remark:"text" |
Adds a comment to the shared resource. |
/cache:automatic |
Enables offline cache and automatic reintegration. |
/cache:manual |
Enables offline cache with manual reintegration. |
/cache:no |
Advises that offline cache is not recommended. |
/delete |
Terminates the sharing of a resource. |
Net start
Displays a list of started services. It is also used to start services.
Syntax
net start [service]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of active services. |
[service] |
Specifies the name of a service to start. |
Netstat
Displays statistics for current TCP/IP connections.
Syntax
netstat [-a] [-e] [-n] [-o] [-p protocol] [-r] [-s] [interval]
Parameters
Parameter |
Purpose |
---|---|
[-a] |
Displays all connections. |
[-e] |
Displays Ethernet-related statistics. |
[-n] |
Displays IP addresses and port numbers in numerical form. |
[-o] |
Displays active TCP connections and shows the process ID for each connection. |
[-p protocol] |
Shows connections for the specified TCP/IP protocol. |
[-r] |
Displays the routing table. |
[-s] |
Displays information organized by protocol. |
[interval] |
Displays statistics at the specified interval (in seconds). |
Net statistics
Displays log statistics for the local workstation service, server service, or any other services for which statistics are available.
Syntax
net statistics [workstation | server]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of the active services that provide statistics. |
[workstation] |
Displays local workstation service statistics. |
[server] |
Displays local server service statistics. |
Net stop
Terminates a network service.
Syntax
net stop service
Parameters
Parameter |
Purpose |
---|---|
Service |
Specifies any valid Windows NT or 2000 service. |
Net time
Synchronizes the computer's internal clock with another computer's clock.
Syntax
net time [\computername | /domain[:domainname] | /rtsdomain[:domainname]] [/set] net time [\computername] [/querysntp] | [/setsntp[:ntp server list]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the date and time as set on the computer designated as the network's time server. |
\computername |
Specifies the name of a network server. |
/domain[:domainname] |
Specifies a domain to synchronize with. |
/rtsdomain[:domainname] |
Specifies a domain of the Reliable Time Server to synchronize with. |
/set |
Synchronize the computer's internal clock with the specified computer or domain. |
/querysntp |
Displays the name of the Network Time Protocol server. |
/setsntp[:ntp server list] |
Specifies a list of Network Time Protocol servers to be used using hostnames or IP addresses. |
Net use
Displays information about network connections and connects a computer to network resources.
Syntax
net use [devicename | *] [\computernamesharename[volume]] [password | *]] [/user:[domainname]username] [/user:[dotteddomainname]username] [/user:[username@dotteddomainname] [.savecred] [/smartcard] [[/delete | /persistent:[yes | no]]] net use devicename [/home[password | *]] [/delete:{yes | no}] net use [/persistent:{yes | no}]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of network connections. |
[devicename] |
Assigns a name to a new connection or specifies a device that is to be disconnected. For disk drives, use the D: through Z:, and for printers, use LPT1: through LPT3:. |
[\computernamesharename] |
Specifies the name of the network computer and its shared resource. |
[volume] |
Specifies a server with a NetWare volume. |
[password] |
Specifies a password required to access the resource. |
[*] |
Specifies that you want to be prompted for the password. |
[/user] |
Specifies a different username to be used when making the connection. |
[domainname] |
Allows you to specify another domain. |
[username] |
Specifies the username to use when logging on. |
[dotteddomainname] |
The fully qualified DNS domain name. |
[/delete] |
Terminates a network connection. |
[/persistent] |
Allows you to define persistent connections that span system restarts. |
[yes] |
Restores the connection at next logon. |
[no] |
Doesn't restore the connection at next logon. |
Net user
Displays user account information or adds and modifies user accounts.
Syntax
net user [username [password | *] [options]] [/domain] net user [username {password | *} /add [options] [/domain][ net user [username [/delete] [/domain][
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of user accounts on the local computer. |
[username] |
Specifies the account name to add, delete, change, or view. |
[password] |
Assigns a password to a new account or changes the password of an existing account. |
* |
Prompts for the password. |
[/domain] |
Performs the operation on the primary domain controller instead of locally. |
/add |
Adds a user account. |
[/delete] |
Deletes a user account. |
[options] |
Specifies any of the following options: |
/active:{no | yes} |
Enables or disables the account. |
/comment:"text" |
Adds comments to an account. |
/countrycode:nnn |
Specifies the Country/Region codes to be used for help and error messages. |
/expires:{date | never} |
Specifies the status of account expiration. |
/fullname:"name" |
Sets a user's full name rather than a username. |
/homedir:path |
Establishes the user's home directory. |
/passwordchg:{yes | no} |
Determines whether the users can change their passwords. |
/passwordreq:{yes | no} |
Specifies a password requirement. |
/profilepath:[path] |
Establishes the user's logon profile. |
/scriptpath:path |
Establishes the path for the user's logon script. |
/times:{times | all} |
Defines time frames in which the user is permitted to use the computer. For example: W,8AM-5PM; F,8AM-1PM. |
/usercomment:"text" |
Determines whether an administrator can change or add to the user comment. |
/workstations:} {computername[,…] | * |
Specifies up to eight workstations where the user is permitted to log on. |
Net view
Displays a list of domains, computers, or resources being shared by a specified computer.
Syntax
net view [\computername | /domain[:domainname]] net view /network:nw [\computername]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays a list of computers in the domain. |
[\computername] |
Specifies a computer so that its resources can be viewed. |
/domain[:domainname] |
Specifies the domain that is to be viewed. |
/network:nw |
Displays servers on a Novell NetWare network. |
Nslookup
Displays information from DNS (Domain Name System) name servers.
Syntax
nslookup [-option ...] [computer-to-find | - [server]]
Parameters
Parameter |
Purpose |
---|---|
[-option …] |
Specifies nslookup commands to be used as command-line options. |
[computer-to-find] |
Displays information for computer-to-find using the default DNS server. |
[server] |
Specifies a different DNS server to query. |
Ntbackup
Provides a means for initiating backups from the command prompt.
Syntax
Ntbackup backup [systemstate] "@filename" /J ["jobname"] [/P ["poolname"]] [/G ["guidname"]] [/T ["tapename"] [/N {"medianame"]] [/F ["filename"]] [/D ["description"] [/DS ["server"]] [/IS ["server"]] [/A] [/V: {yes | no]] [/R: [yes | no]] [/L: [f | s | n]] [/M backuptype]] [/RS: [yes | no ]] [/HC: [on | off]] [/SNAP: [on | off]]
Parameters
Parameter |
Purpose |
---|---|
backup |
Specifies a backup operation is to be performed. |
[systemstate] |
Backs up system state data. |
"@filename" |
Identifies a backup selection file to be used. |
/J ["jobname"] |
Sets the job name to be listed in the job file. |
[/P ["poolname"]] |
Sets the media pool value. |
[/G ["guidname"]] |
Changes or adds a GUID. |
[/T ["tapename"] |
Changes or adds a tape name. |
[/N {"medianame"]] |
Sets a new tape name. |
[/F ["filename"]] |
Specifies the path and file name. |
[/D ["description"] |
Sets the label for a backup set. |
[/DS ["server"]] |
Backs up the directory service file on exchange servers. |
[/IS ["server"]] |
Backs up the Information Store file on exchange servers. |
[/A] |
Performs an append. |
[/V: {yes | no]] |
Verifies the integrity of the backup. |
[/R: [yes | no]] |
Limits access to its owner and administrators. |
[/L: [f | s | n]] |
Sets the log type (f = full, s = summary, n = no log is created). |
[/M backuptype]] |
Sets the backup type. Options are: daily, differential, and incremental. |
[/RS: [yes | no ]] |
Backs up migrated data found on remote storage. |
[/HC: [on | off]] |
Uses hardware compression if available on the tape drive. |
[/SNAP: [on | off]] |
Specifies whether the backup is a volume shadow copy. |
Ntcmdprompt
Runs CMD.EXE instead of COMMAND.COM after starting a TSR (Terminate and Stay Resident) program.
Syntax
ntcmdprompt
Path
Establishes a search path for executable files.
Syntax
path [[drive:]path[;...]] [%path%]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the current search path. |
[drive:]path |
Specifies a location to search. |
; |
If used as the only parameter, it clears all path settings. |
[%path%] |
Appends the current path to the new setting. |
Pathping
A route-tracing command that combines the functionality of the ping and tracert commands.
Syntax
pathping [-n] [-h maximum_hops] [-g host-list] [-p period] [-q num_queries [-w timeout] [-T] [-R] target_name
Parameters
Parameter |
Purpose |
---|---|
-n |
Specifies not to resolve addresses to hostnames. |
-h maximum_hops |
Specifies a maximum number of hops when trying to reach the target. |
-g host-list |
Allows computers to be separated by intermediate gateways along host-list. |
-p period |
Specifies the time to wait (in milliseconds) between pings. |
-q num_queries |
Specifies the number of queries allowed for servers along the route. |
-w timeout |
Specifies the length of time to wait for a reply (in milliseconds). |
-T |
Includes a layer-2 priority tag to each ping packet that is sent to network devices along the route. |
-R |
Determines whether each network device on the route supports the RSVP (Resource Reservation Setup Protocol). |
target_name |
Specifies the destination target using either its hostname or its IP address. |
Pause
Suspends processing of a script and prompts the user to press any key to continue.
Syntax
pause
Pbadmin
Administers phone books.
Syntax
Pbadmine.exe /N phonebook [/R regionfilepath egionfilename] [/P datafilepathdatafilename] Pbadmine.exe /I phonebook /R regionfilepath egionfilename Pbadmine.exe /I phonebook /R datafilepathdatailename Pbadmine.exe /O phonebook computername username passwd Pdadmine.exe /B phonebook
Parameters
Parameter |
Purpose |
---|---|
None |
Starts the Phone Book Administrator. |
/N phonebook |
Creates a new phone book. |
[/R regionfilepath egionfilename] |
Sets the location and name of a region file to be used in an import operation. |
[/P datafilepathdatafilename] |
Sets the location and file name of a phone book file to be used in an import operation. |
/I phonebook |
Imports dates into a phone book. Sources include region and phone book files. |
/O |
Sets phone book options. |
phonebook |
Specifies the phone book's name |
computername |
Specifies the computer where the phone book is to be published. |
username |
Specifies the username that has FTP permissions over the phone book service on the target computer. |
passwd |
Specifies the user's password |
/B phonebook |
Publishes the phone book. |
Pentnt
Looks for the floating-point division error in the Pentium chip, disables floating-point hardware, and turns on floating-point emulation if found.
Syntax
pentnt [-c] [-f] [-o]
Parameters
Parameter |
Purpose |
---|---|
[-c] |
Turns on conditional emulation. |
[-f] |
Turns on forced emulation. |
[-o] |
Turns off forced emulation and turns on floating-point hardware. |
Perfmon
Opens the Performance console using the same settings found in the Windows NT 4.0 Performance Monitor utility.
Syntax
Perfmon.exe [filename] [/HTMLFILE:settingsfile]
Parameters
Parameter |
Purpose |
---|---|
[filename] |
Specifies the file name of an optional settings file. |
[/HTMLFILE:settingsfile] |
Specifies the name of converted files and the name of the Windows NT 4 settings file. |
Ping
Tests connections with network devices on TCP/IP networks.
Syntax
ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list
Parameters
Parameter |
Purpose |
---|---|
[-t] |
Repeatedly pings the specified computer. |
[-a] |
Resolves IP addresses to computer names. |
[-n count] |
Sends the specified number of ECHO packets as defined by count. |
[-l length] |
Transmits ECHO packets of the specified length. |
[-f] |
Prevents packets from being fragmented by gateways. |
[-i ttl] |
Sets the TTL field to the specified ttl value. |
[-v tos] |
Sets the TOS field to the specified tos value. |
[-r count] |
Stores the route taken by outgoing packets and returning packets in the Record Route field. |
[-s count] |
Sets a timestamp for the number of hops as set by count. |
[-j computer-list] |
Routes packets by way of the list of computers specified by computer-list and permits consecutive computers to be separated by intermediate gateways. |
[-k computer-list] |
Routes packets by way of the list of computers specified by computer-list and prevents consecutive computers from being separated by intermediate gateways. |
[-w timeout] |
Specifies the time-out interval (in milliseconds). |
destination-list |
Specifies a list of target computers. |
Popd
Changes to the directory stored by pushd.
Syntax
popd
Displays the contents of a print queue or prints a text file.
Syntax
print [/d:device] [[drive:][path] filename[ ...]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the print queue contents. |
[/d:device] |
Specifies a print device. Use LPT1, LPT2, and LPT3 or \servernameprint_share. |
[drive:][path] filename |
Specifies the drive, path, and file name of the file to be printed. |
Prompt
Changes the command prompt.
Syntax
prompt [text]
Parameters
Parameter |
Purpose |
||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
none |
Resets the command prompt to its default setting. |
||||||||||||||||||||||||||||||||||||||||
[text] |
|
Pushd
Records the name of the current directory for use by the popd command and then changes to the specified directory.
Syntax
pushd [path]
Parameters
Parameter |
Purpose |
---|---|
[path] |
Specifies a directory to set as the current directory. |
Rasdial
Automates the RAS (Remote Access Service) client connection process.
Syntax
rasdial connectioname [username [passwd | *]] [/domain:domain] [/phone:phonenumber] [/callback:callbacknumber] [/phonebook:phonebookpath] [/prefixsuffix] rasdial [connectionname] /disconnect
Parameters
Parameter |
Purpose |
---|---|
connectioname |
Specifies the name given to the connection when it was set up. |
[username [passwd | *]] |
Specifies a username and password with which to establish the connection. |
[/domain:domain] |
Identifies the domain where the user account resides. |
[/phone:phonenumber] |
Substitutes the specified phone number. |
[/callback:callbacknumber] |
Substitutes the specified call back number. |
[/phonebook:phonebookpath] |
Sets the path to the phone book file. |
[/prefixsuffix] |
Applies current TAPI location settings. |
Rcp
Copies files between a Windows computer and a UNIX system.
Syntax
rcp [-a | -b] [-h] [-r] [host] [.user:] [source] [host] [.user:] [pathdestionation]
Parameters
Parameter |
Purpose |
---|---|
[-a] |
Specifies the use of the ASCII transfer mode. |
[-b] |
Specifies the use of the binary image transfer mode. |
[-h] |
Transfers files with hidden attributes on Windows computers. |
[-r] |
Copies the contents of all subdirectories to the destination server. |
[host] |
Specifies the target host computer. |
[.user:] |
Specifies the username. |
[source] |
Identifies the files to be copied. |
[pathdestionation] |
Specifies the destination on the target computer where the files are to be copied. |
Recover
Attempts to recover information from a damaged disk.
Syntax
recover [drive:][path] filename
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Identifies the drive, path, and file name of the file to be recovered. |
Reg add
Displays, changes, or adds a registry subkey and value.
Syntax
reg add keyname [/v entry] [/ve] [/t type] [/s separator] [/d value] [/f]
Parameters
Parameter |
Purpose |
---|---|
Keyname |
Specifies the path to the subkey. |
[/v entry] |
Specifies the entry name to be added. |
[/ve] |
Adds the entry as a null value. |
[/t type] |
Sets the entry type (REG_SZ, REG_MULTI-SZ, REG_DWORD_BIG_ENDIAN, REG_DWORD, REG_BINARY, REG_DWORD_LITTLE_ENDIAN, REG_LINK, REG_FULL_RESOURCE_DESCRIPTOR AND REG_EXPAND_SZ). |
[/s separator] |
When using the REG_MULTI-SZ type, this parameter specifies the separator chapter that is to identify multiple pieces. |
[/d value] |
Specifies a value for a new registry entry. |
[/f] |
Adds a subkey or entry without requiring confirmation. |
Reg compare
Compares two registry entries or subkeys.
Syntax
reg compare key1 key2 [/v entry] [/ve] [[/oa] | [od] | [/os] | [/on]] [/s]
Parameters
Parameter |
Purpose |
---|---|
key1 |
Specifies the path and name of the first entry or subkey. |
key2 |
Specifies the path and name of the second entry or subkey. |
[/v entry] |
Compares a specific subkey entry. |
[/ve] |
Limits the comparison to entries without values. |
[/oa] |
Displays all differences and matches. |
[od] |
Displays only differences. |
[/os] |
Displays only matches. |
[/on] |
Prevents the display of differences or matches. |
[/s] |
Performs a comparison of all entries and subkeys. |
Reg copy
Copies registry entries.
Syntax
reg copy key1 key2 [/s] [/f]
Parameters
Parameter |
Purpose |
---|---|
key1 |
Specifies the path and name of the first entry or subkey. |
key2 |
Specifies the path and name of the second entry or subkey. |
[/s] |
Copies all entries and subkeys. |
[/f] |
Copies the subkey without requiring confirmation. |
Reg delete
Deletes registry entries and subkeys.
Syntax
reg delete key [/v entry | /ve | /va] [/f]
Parameters
Parameter |
Purpose |
---|---|
key |
Specifies the path and name of the entry or subkey. |
[/v entry] |
Deletes a specific entry. |
[/ve] |
Only deletes entries with a null value. (continues) |
[/va] |
Deletes all entries on the subkey. |
[/f] |
Performs the deletion without requiring confirmation. |
Reg export
Copies subkeys, entries, and values to an external file to allow them to be transferred to another computer.
Syntax
reg export key filename
Parameters
Parameter |
Purpose |
---|---|
key |
Specifies the path and name of the subkey. |
filename |
Specifies the name of the external file. |
Reg import
Copies the subkeys, values, and entries from an external file into the registry.
Syntax
reg import filename
Parameters
Parameter |
Purpose |
---|---|
filename |
Specifies the name and path of the external file. |
Reg load
Copies save entries and subkeys to a different registry subkey.
Syntax
reg load keyname filename
Parameters
Parameter |
Purpose |
---|---|
keyname |
Specifies the path to the subkey. |
filename |
Specifies the name and path of the file to be loaded. |
Reg query
Displays child entries and subkeys for the specified subkey.
Syntax
reg query key [/v entry | /ve] [/s]
Parameters
Parameter |
Purpose |
---|---|
key |
Specifies the path of the subkey. |
[/v entry] |
Gets the specified entry and its value. |
[/ve] |
Only returns entries with a null value. |
[/s] |
Gets all entries and subkeys in all tiers. |
Reg restore
Restores saved registry subkeys and entries.
Syntax
reg restore key filename
Parameter
Parameter |
Purpose |
---|---|
key |
Specifies the path to the subkey. |
filename |
Specifies the name and path of the file that contains the entries and subkeys to be restored. |
Reg save
Saves specified values, entries, and subkeys to a file.
Syntax
reg save key filename
Parameters
Parameter |
Purpose |
---|---|
key |
Specifies the path of the subkey. |
filename |
Specifies the name and path of the file that will be created. |
Regsvr32
Registers .dll files with the registry.
Syntax
Regsvr32 [/u] [/s] [/n] [/I[:cmdline]] dllname
Parameters
Parameter |
Purpose |
---|---|
[/u] |
Unregisters server. |
[/s] |
Sets regsvr32 to run silently in background mode. |
[/n] |
Prohibits the calling of DllRegisterServer. |
[/I[:cmdline]] |
Calls DllInstall and supplies the argument supplied by cmdline if present. |
Dllname |
Specifies the DLL to register. |
Reg unload
Removes a portion of the registry that was previously loaded using the reg load command.
Syntax
reg unload key
Parameters
Parameter |
Purpose |
---|---|
key |
Specifies the path to the subkey. |
Relog
Extracts performance counters from counter logs and converts the data into different formats, including text, comma-delimited text, and SQL.
Syntax
Relog [filename [filename ...]] [-a] [-c path [path ...]] [-cf filename] [-f [bin | csv | tsv | SQL]] [-t value] [-o [outputfile | DSNcouterlog]] [-b m/d/yyyy [[hh:]mm:]ss] [-e m/d/yyyy [[hh:]mm:]ss] [-config filename] [-q]
Parameters
Parameter |
Purpose |
---|---|
[filename [filename …]] |
Specifies the path and file name of one or more input files. |
[-a] |
Appends data from the input file. |
[-c path [path …]] |
Specifies the performance counter path to be logged. |
[-cf filename] |
Specifies the pathname of a text file that contains a list of counters to be added to the relog file. |
[-f [bin | csv | tsv | SQL]] |
Sets the output files format (bin = binary, csv = text, tsv = comma-delimited text, and sql = SQL). |
[-t value] |
Specifies the collection interval. |
[-o [outputfile | DSNcouterlog]] |
Sets the path for the output file or SQL database where counters are stored. |
[-b m/d/yyyy [[hh:]mm:]ss] |
Sets the start time for copying the first record from the input file. |
[-e m/d/yyyy [[hh:]mm:]ss] |
Sets the stop time for copying the last record from the input file. |
[-config filename] |
Sets the path of an optional settings file that supplies command-line parameters. |
[-q] |
Displays performance counters and time ranges for a specified input file. |
Rem
Used to place comments in scripts.
Syntax
rem [comment]
Parameters
Parameter |
Purpose |
---|---|
[comment] |
A string of descriptive text information. |
Rename (Ren)
Renames a file or group of files.
Syntax
rename [drive:][path] filename1 filename2 ren [drive:][path] filename1 filename2
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename1 |
Specifies the drive, path, and file name of the file to be renamed. |
filename2 |
Specifies the new name for the file. |
Replace
Replaces files in the destination directory with files that have the same name.
Syntax
replace [drive1:][path1] filename [drive2:][path2] [/a] [/p] [/r] [/w] replace [drive1:][path1] filename [drive2:][path2] [/p] [/r] [/s] [/w] [/u]
Parameters
Parameter |
Purpose |
---|---|
[drive1:][path1] filename |
Specifies the drive, path, and file name of the source files. |
[drive2:][path2] |
Specifies the drive and path of the destination files. |
[/a] |
Adds files to the destination folder. |
[/p] |
Prompts for confirmation before a replacement is allowed. |
[/r] |
Permits the replacement of read-only files. |
[/w] |
Waits for you to insert a disk before beginning to look for the source files. |
[/s] |
Searches all subfolders in the destination folder and replaces matching files. |
[/u] |
Replaces files in the destination folder only if they are older than the files in the source folder. |
Reset session
Resets a terminal server session.
Syntax
Reset session [sessionname | sessionid] [/server:servername] [/v]
Parameters
Parameter |
Purpose |
---|---|
[sessionname] |
Name of the session to be reset. |
[sessionid] |
The session ID of the session to be reset. |
[/server:servername] |
Identifies the terminal sever where the session exists. |
[/v] |
Displays verbose information. |
Rexec
Executes commands on remote computers that support the Rexec service.
Syntax
rexec computer [-l username] [-n] command
Parameters
Parameter |
Purpose |
---|---|
computer |
Specifies the remote computer. |
[-l username] |
Specifies a username on the remote computer. |
[-n] |
Redirects the input of REXEC to NULL. |
command |
Specifies the command to be executed. |
Rmdir (Rd)
Deletes a folder.
Syntax
rmdir [drive:]path [/s] [/q] rd [drive:]path [/s] [/q]
Parameters
Parameter |
Purpose |
---|---|
[drive:]path |
Specifies the drive and path of the folder to be deleted. |
[/s] |
Deletes the folder and its subfolders and their contents. |
[/q] |
Deletes folders without requiring confirmation. |
Route
Configures routing tables.
Syntax
route [-f] [-p] [command [destination] [mask subnetmask] [gateway] [metric costmetric]] [if interface]]
Parameters
Parameter |
Purpose |
---|---|
[-f] |
Clears the routing tables of gateway entries. |
[-p] |
Makes routes persistent across system restarts. |
[command] |
Prints, adds, deletes, or changes the destination. |
[destination] |
Specifies the computer where the command will be sent. |
[mask subnetmask] |
Specifies a subnet mask for the route entry. |
[gateway] |
Specifies a gateway. |
[metric costmetric] |
Assigns an integer cost metric. |
[if interface] |
Specifies the interface index for the interface. |
Rsh
Executes commands on remote computers that run the RSH service.
Syntax
rsh computer [-l username] [-n] command
Parameters
Parameter |
Purpose |
---|---|
computer |
Specifies the remote computer. |
[-l username] |
Specifies a username to use at the remote computer. |
[-n] |
Redirects the input of Rsh to NULL. |
command |
Specifies the command. |
Runas
Permits the execution of specific tools and programs with different permissions than those provided by the user's current account.
Syntax
runas [/profile | /noprofile] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] /user:UserAccountName program
Parameters
Parameter |
Purpose |
---|---|
/profile |
Provides the name of the user's profile. |
/noprofile |
Prevents loading the user's profile. |
/env |
Replaces the user's local environment with the current network environment. |
/netonly |
Specifies that the user information is to be used for remote access. |
[/smartcard] |
Specifies that credentials are to be provided by a smartcard. |
[/showtrustlevels] |
Displays /trustlevel options. |
[/trustlevel] |
Sets the authorization level that is to be used to run the application. |
/user:UserAccountName |
Specifies the account with which to execute the program in the form of user@domain or domainuser. |
program |
Specifies the program or command to be executed by a specified account. |
Set
Displays, changes, and deletes environment variables.
Syntax
Set [[/a [expression]] [/p [variable=]] string]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays environment settings. |
[/a [expression] |
Sets string equal to a numerical expression. |
[/p] |
Sets a variable value equal to a line of input. |
variable |
Identifies the variable to set or modify. |
string |
Sets the value of the variable to string. |
Setlocal
Initiates the localization of environment variables in a script.
Syntax
Setlocal [enableextension | disableextensions] [enabledelayedexpansion | disabledelayedexpansion]
Parameters
Parameter |
Purpose |
---|---|
[enableextension] |
Enables command extensions. |
[disableextensions] |
Disables command extensions. |
[enabledelayedexpansion] |
Enables delayed environment variable expansion. |
[disabledelayedexpansion] |
Disables delayed environment variable expansion. |
Setver
Modifies the version number that the MS-DOS subsystem reports to executing programs.
Syntax
setver [drive:path] [filename n.nn] setver [drive:path] [filename [/delete [/quiet]] setver [drive:path]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the current version table. |
[drive:path] |
Specifies drive and path to SETVER.EXE. |
[filename] |
Specifies a program name to be added to the version table. |
[n.nn] |
Specifies the MS-DOS version that is reported to the specified program file. |
[/delete] |
Removes the version table entry for the specified program file. |
[/quiet] |
Hides deletion messages. |
Sfc
Scans protected file systems and verifies their integrity.
Syntax
Sfc [/scannow] [/scanonce] [/scanboot] [/revert] [purgecache] [/cachesize=x]
Parameters
Parameter |
Purpose |
---|---|
[/scannow] |
Performs an immediate scan of all protected file systems. |
[/scanonce] |
Scans all protected file systems at one time. |
[/scanboot] |
Scans all protected file systems every time the computer is started. |
[/revert] |
Restores the scan to its default settings. |
[purgecache] |
Clears out Windows File Protection cache and performs an immediate scan. |
[/cachesize=x] |
Sets a maximum cache size in MB for Windows File Protection cache. |
Shell
Specifies an alternative command interpreter to be used in place of the MS-DOS subsystem.
Syntax
shell=[[drive:]path] filename [parameters]
Parameters
Parameter |
Purpose |
---|---|
[[drive:]path] filename |
Specifies the drive, path, and file name of the alternative command interpreter. |
[parameters] |
Provides any command-line parameters required by the alternative command interpreter. |
Shift
Shifts (changes) the position of replaceable parameters in a script.
Syntax
Shift /n
Parameters
Parameter |
Purpose |
---|---|
/n |
Identifies the argument where shifting should begin, where n is a value from 0 to 8. |
Shutdown
Shuts down Windows XP and optionally restarts the computer or logs off the current user.
Syntax
shutdown [[-l | -s | -r | -a]] [-f] --m[\computer]] [-t xx] [-c "msg"] [-d[u][p]:xx:yy]
Parameters
Parameter |
Purpose |
---|---|
[-l] |
Logs the current user off. |
[-s] |
Shuts the local computer down. |
[-r] |
Restarts the computer once it has been shut down. |
[-a] |
Aborts the shutdown process. |
[-f] |
Forces the termination of active applications. |
–m[\computer]] |
Allows for the specification of a remote computer. |
[-t xx] |
Specifies the amount of time to wait before the shutdown occurs. |
[-c "msg"] |
Displays a message in the System Shutdown dialog message area. |
[-d[u][p]:xx:yy] |
Lists a reason code for the shutdown (u = user code, p = planned shutdown code, xx = a major reason code with a value between 0 and 255, and yy = a minor reason code with a value of 0 to 65536). |
Sort
Reads input and sorts it before writing it as output.
Syntax
sort [/r] [/+n] [/m kilobytes] [/l locale] [/rec characters] [[drive1:][path1]filename1] [/t [drive2:][path2]] [/o [drive3:][path3]filename3] [command |] sort [/r] [/+n] [/m kilobytes] [/l locale] [/rec characters] [[drive1:][path1]filename1] [/t [drive2:][path2]] [/o [drive3:][path3]filename3]
Parameters
Parameter |
Purpose |
---|---|
/r |
Reverses the sort order. |
/+n |
Specifies the starting character position, n, where sort begins its comparison. |
/m kilobytes |
Specifies the allocation of memory for use by the sort command (in kilobytes). |
/l locale |
Changes the sort order of characters as defined by the default locale. The only available option is the "C" locale. |
/rec characters |
Sets the maximum number of characters that can be contained in a line on the input file (default is 4,096; maximum is 65,535). |
[drive1:][path1]filename1 |
Specifies the location of the file to be sorted. |
/t [drive2:][path2] |
Specifies a path to a folder that the sort command can use for working storage when the data to be sorted cannot fit into memory. |
/o [drive3:][path3] |
Specifies where a file's sorted input is to be stored. filename3 |
Start
Opens a new command prompt window and executes the specified program, script, or command.
Syntax
start ["title"] [/d path] [/I] [/min] [/max] [/separate | /shared] [/low | /normal | /high | /realtime | /abovenormal | /belownormal] [/wait] [/b] [filename] [parms]
Parameters
Parameter |
Purpose |
---|---|
["title"] |
Displays the specified title in the command prompt title bar. |
[/d path] |
Specifies the path of the startup folder. |
[/I] |
Passes the environment settings of the CMD.exe startup environment to the command prompt window. |
[/min] |
Minimizes the new window. |
[/max] |
Maximizes the new window. |
[/separate] |
Loads 16-bit applications into a separate memory space. |
[/shared] |
Loads 16-bit applications into a shared memory space. |
[/low] |
Runs the program and assigns it the idle priority. |
[/normal] |
Runs the program and assigns it the normal priority. |
[/high] |
Runs the program and assigns it the high priority. |
[/realtime] |
Runs the program and assigns it the real time priority. |
[/abovenormal] |
Runs the program and assigns it the above normal priority. |
[/belownormal] |
Runs the program and assigns it the below normal priority. |
[/wait] |
Runs the program and then waits for it to end. |
[/b] |
Starts an application without opening a command prompt window. |
[filename] |
Identifies the command or application to execute. |
[parms] |
Argument to be passed to the command or program. |
Subst
Establishes an association between a path and a drive letter.
Syntax
subst [drive1: [drive2:]path] subst drive1: /d
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the names of any virtual drives. |
[drive1:] |
Specifies the virtual drive. |
[drive2:] |
Specifies the physical drive containing the specified path. |
[path] |
Specifies the path to be assigned to the virtual drive. |
/d |
Removes a virtual drive. |
Systeminfo
Displays configuration information about a computer and its operating system and hardware.
Syntax
systeminfo[.exe] [/s computer [/u domainuser [/p passwd]]] [/fo [table | list | csv]] [/nh]
Parameters
Parameter |
Purpose |
---|---|
[/s computer] |
Specifies the target computer's name or IP address. |
[/u domainuser] |
Executes the command using the supplied user's permissions. |
[/p passwd] |
Specifies the user's password. |
[/fo [table | list | csv]] |
Specifies output format (table, list, or CSV). |
[/nh] |
Suppresses column headers. |
Taskkill
Terminates tasks and processes.
Syntax
taskkill [/s computer] [/u domainuser [/p passwd]] [/fi filter] [/pid processid] | [/im image] [/f] [/t]
Parameters
Parameter |
Purpose |
---|---|
[/s computer] |
Specifies the name or IP address of the target computer. |
[/u domainuser] |
Executes the command using the supplied user's permissions. |
[/p passwd] |
Specifies the user's password. |
[/fi filter] |
Specifies the type of process to terminate or not to terminate. |
[/pid processid] |
Specifies the process ID of the process to kill. |
[/im image] |
Specifies the image name of the process to kill. |
[/f] |
Forcefully terminates a process. |
[/t] |
Terminates all child processes of the parent process. |
Tasklist
Lists applications and services, including their process ID.
Syntax
Tasklist[.exe] [/s computer] [/u domainuser [/p passwd]] [/fo [table | list | csv]] [/nh] [/fi filter] [/fi filter2 [ ... ]]] [/m [module] | /svc] /v]
Parameters
Parameter |
Purpose |
---|---|
[/s computer] |
Specifies the name or IP address of the target computer. |
[/u domainuser] |
Executes the command using the supplied user's permissions. |
[/p passwd] |
Specifies the user's password. |
[/fo [table | list | csv]] |
Specifies the format of the command's output. |
[/nh] |
Suppresses column headings. |
[/fi filter] |
Specifies the type of process to include or exclude from output. |
[/m [module] |
When specified, all processes using the module are listed, otherwise they are excluded. |
[/svc] |
Displays all available service information. |
[/v] |
Displays verbose output. |
Tcmsetup
Configures the telephony client.
Syntax
tcmsetup [/q] [/x] /c server1 [server2 ... serverN] tcmsetup [/q] /c /d
Parameters
Parameter |
Purpose |
---|---|
[/q] |
Prevents message box displays. |
[/x] |
Sets connection-oriented callbacks for heavy traffic networks with high pack-loss. |
/c |
Specifies client setup. Required parameter. |
server1 |
Contains the remote server where the client will use TAPI service providers. |
[server2 … serverN] |
Lists additional servers that are available to the client. |
/d |
Clears the list of remote servers and disables the telephony client. |
Tftp
Transfers files between the local computer and a remote computer running the TFTP (Trivial File Transfer Protocol) service.
Syntax
tftp [-i] computer [get | put] source [destination]
Parameters
Parameter |
Purpose |
---|---|
[-I] |
Sets binary image transfer mode. |
computer |
Specifies the local or remote computer. |
[put] |
Uploads files to the file source on the remote computer. |
[get] |
Downloads the file on the remote computer to the file source on the local computer. |
source |
Identifies the file to transfer. |
[destination] |
Identifies where to transfer the file. |
Time
Displays system time or changes the computer's internal clock.
Syntax
time [/t] [hours:[minutes[:seconds[.hundredths]]] [A|P]]
Parameters
Parameter |
Purpose |
---|---|
None |
Displays the computer's clock time and prompts for the new time. |
[/t] |
Displays current time without prompting to change the time. |
[hours] |
Sets the hour. |
[minutes] |
Sets the minutes. |
[seconds] |
Sets the seconds. |
[hundredths] |
Sets hundredths of a second. |
[A|P] |
Sets A.M or P.M. for the 12-hour format. |
Title
Places a message on the command console's title bar.
Syntax
title [string]
Parameters
Parameter |
Purpose |
---|---|
[string] |
Specifies the message text. |
Tracerpt
Processes trace logs or data from event trace providers and creates reports.
Syntax
tracerpt [filename [filename ...]] [-o [filename]] [-report [filename]] [-rt session [session ...]] [-summary [filename]] [-config [filename]
Parameters
Parameter |
Purpose |
---|---|
[filename [filename …]] |
Specifies the file name to be used during the event trace session. |
[-o [filename] |
Specifies a comma-delimited file. |
[-report [filename]] |
Sets the name of the output report file. |
[-rt session [session …]] |
Gathers data from a realtime source. |
[-summary [filename]] |
Specifies the name of the output summary file. |
[-config [filename] |
Specifies the path of a settings file that supplies command-line arguments. |
Tracert
A utility used to determine the route taken to a destination.
Syntax
tracert [-d] [-h maximum_hops] [-j computer-list] [-w timeout] target_name
Parameters
Parameter |
Purpose |
---|---|
[-d] |
Prevents the resolution of IP addresses to hostnames. |
[-h maximum_hops] |
Sets a maximum number of hops. |
[-j computer-list] |
Specifies a loose source route along computer-list. |
[-w timeout] |
Waits the specified number of milliseconds for each reply. |
target_name |
Identifies the target computer. |
Tree
Provides a graphic view of the folder structure for the specified path or disk.
Syntax
tree [drive:][path] [/f] [/a]
Parameters
Parameter |
Purpose |
---|---|
[drive:] |
Identifies a drive that contains a disk whose directory structures should be displayed. |
[path] |
Identifies a folder whose directory structure is to be displayed. |
[/f] |
Displays the file names found in each directory. |
[/a] |
Sets the tree command to display text characters in place of graphic characters when identifying links to a subfolder. |
Type
Displays the contents of a text file.
Syntax
type [drive:][path] filename
Parameters
Parameter |
Purpose |
---|---|
[drive:][path] filename |
Specifies the drive, path, and file name that is to be viewed. |
Typeperf
Displays performance counter output to the console window or logs in to a file.
Syntax
typeperf [path [path ...]] [-cf filename] [-f [csv | tsv | bin]] [-si interval] [-o filename] [-q [object]] [-qx [object]] [-sc samples] [-config filename] [-s computer]
Parameters
Parameter |
Purpose |
---|---|
[path [path …]] |
Specifies the path and name of the performance counter log that is to be used. |
[-cf filename] |
Specifies the filename of a file that lists counter paths that are to be monitored. |
[-f [csv | tsv | bin]] |
Specifies output format (csv = comma-delimited text file, tsv = tab-delimited text file, and bin = binary). |
[-si interval] |
Sets the time interval between collections in [mm:]ss format. |
[-o filename] |
Specifies an output file. |
[-q [object]] |
Displays counters that do not have instances. |
[-qx [object]] |
Displays counters with instances. |
Parameters
Parameter |
Purpose |
---|---|
[-sc samples] |
Specifies the number of samples to be collected. |
[-config filename] |
Specifies the name of a file that contains command-line arguments. |
[-s computer] |
Specifies the target computer. |
Unlodctr
Unloads performance counter names for services and device drivers from the registry.
Syntax
unlodctr [\computer] drivername
Parameters
Parameter |
Purpose |
---|---|
[\computer] |
Specifies the target computer. |
drivername |
Unloads the performance counter names for service and device driver drivername. |
Ver
Displays the Windows version number.
Syntax
ver
Vol
Displays the serial number and disk volume label of the disk.
Syntax
vol [drive:]
Parameters
Parameter |
Purpose |
---|---|
[drive:] |
Specifies the drive whose information you want to display. |
Vssadmin
Displays volume shadow copy backups and shadow copy writers.
Syntax
vssadmin list [shadows [/set= [shadow copy of GUID]] | writers | provides]
Parameter
Parameter |
Purpose |
---|---|
List [shadows [/set= [shadow copy of GUID]] |
Displays shadow copies for the shadow copy set. |
[writers] |
Displays information about installed shadow copy writers. |
[provides] |
Displays information about installed shadow copy providers. |
W32tm
Diagnoses Windows Time problems.
Syntax
W32tm [/config [/computer] [[/update] [/manualpeerlist:list fo names]] [/syncfromflags:listofflags]] | /monitor | /ntpte | /register | resync [[:computer] [/nowait] | [/rediscover]] | [/tz | /unregister]
Parameters
Parameter |
Purpose |
---|---|
[/config [/computer] [[/update] [/manualpeerlist:list fo names]] [/syncfromflags:listofflags] |
Changes time setting on the target computer. |
Parameters
Parameter |
Purpose |
---|---|
/monitor |
Monitors the target computer. |
/ntpte |
Converts system time to a readable format. |
/register |
Registers execution as a service. |
resync [[:computer] [/nowait] | [/rediscover]] |
Resynchronizes the clock at the first available opportunity. |
[/tz] |
Displays time zone information. |
[/unregister] |
Unregisters the services and any configuration date. |
Xcopy
Copies folders and their contents, including files and subfolders.
Syntax
xcopy source [destination] [/w] [/p] [/c] [/v] [/q] [/f] [/l] [/d[:date]] [/u] [/i] [/s [/e]] [/t] [/k] [/r] [/h] [/a|/m] [/n] [/o] [/x] [/exclude:file1[+[file2]][+[file3]] [/y | /-y] [/z]
Parameters
Parameter |
Purpose |
---|---|
source |
Specifies location and name of the files to be copied. |
[destination] |
Specifies the destination of the copied files. |
[/w] |
Displays a confirmation message and waits for a reply. |
[/p] |
Prompts for confirmation before creating destination files. |
[/c] |
Ignores all errors. |
[/v] |
Verifies the success of each copy operation. |
[/q] |
Prevents the display of xcopy messages. |
[/f] |
Displays the file names being copied. |
[/l] |
Prevents command execution and displays a list of files that would have been copied. |
/d[:date] |
Copies source files that have been changed on or after date. |
[/u] |
Copies files from source if they also exist on destination. |
[/I] |
Creates the destination folder, if it does not exist, if source is a directory or contains wildcards. |
[/s] |
Copies directories and subdirectories as long as they contain files. |
[/e] |
Copies all subfolders. |
[/t] |
Copies the subdirectory structure and not the files. |
[/k] |
Copies read-only files to the destination where they will retain their read-only status. |
[/r] |
Overwrites read-only files. |
[/h] |
Copies files with hidden and system file attributes. |
[/a] |
Copies source files that have archive file attributes set. |
[/m] |
Copies source files that have archive file attributes set and then turns off archive file attributes. |
[/o] |
Copies file ownership and discretionary access control list data. |
[/x] |
Copies audit settings and system access control list data. |
[/n] |
Copies files using their NTFS short names. |
[/exclude:file1[+[file2]] [+[file3]] |
Excludes the files listed in specified files from being copied. |
[/y] |
Suppresses confirmation prompts when overwriting existing destination files. |
[/-y] |
Requires confirmation prompts before overwriting existing destination files. |
[/z] |
Copies files to the network in restartable mode so that the copy operations will resume after failed connections are reestablished. |
Part I - Introducing Microsoft VBScriptBasics
Part II - Professional Project 1 Desktop Administration Using VBScript and the WSH
Part III - Professional Project 2 Analyzing Application Logs
Part IV - Professional Project 3 Creating a Centralized Report Management Station
Part V - Professional Project 4 Reporting Application Summary Data via the Web
Part VI - Introducing Microsoft VBScriptBasics