Categories



Still have a problem? Ask for help at our discussion forum.

Search


Advanced Search

 »  Home  »  Keyboard Shortcuts  »  List of Windows Command Line Utilities
List of Windows Command Line Utilities
Published  07/17/2011 | Keyboard Shortcuts | Unrated
List of Windows Command Line Utilities

Windows XP removes your reliance on the Command Prompt, but it still packs a bunch of utilities that’ll either get you working faster, or simply give you access to tools you didn’t even know you had. This is not an exhaustive list – we’ve omitted commands that aren’t much use to most people.

The Utilities

Assoc
Displays or modifies file name extension associations. Used without parameters, it displays a list of all the current file name extension associations.

Syntax:
assoc [.ext[=[filetype]]]
.ext: Specifies the file name extension.
filetype: Specifies the file type with which you want to associate the specified file name extension.

At
Schedules commands and programs to run on a computer at a specified time and date. You can use at only when the Schedule service is running. Used without parameters, it lists scheduled commands.

Syntax:
at [\\ComputerName] [{[ID] [/delete]|/delete [/yes]}]
at [[\\ComputerName] hours:minutes [/interactive]
[{/every:date[,...]|/next:date[,...]}] command]
\\ ComputerName: Specifies a remote computer. If you omit this parameter, at schedules the commands and programs on the local computer.
ID: Specifies the identification number assigned to a scheduled command.
/delete: Cancels a scheduled command. If you omit ID, all of the scheduled commands on the computer are cancelled.
/yes: Answers yes to all queries from the system when you delete scheduled events.

hours : minutes: Specifies the time when you want to run the command. Time is expressed as hours:minutes in 24-hour notation (that is, 00:00 [midnight] through 23:59).
/interactive : Allows the command to interact with the desktop of the user who is logged on at the time command runs.
/every: : Runs command on every specified day or days of the week or month (for example, every Thursday, or the third day of every month).
date: Specifies the date when you want to run the command. You can specify one or more days of the week (that is, type M,T,W,Th,F,S,Su) or one or more days of the month (that is, type 1 through 31). Separate multiple date entries with commas. If you omit date, at uses the current day of the month.
/next: : Runs command on the next occurrence of the day (for example, next Thursday).
command: Specifies the Windows command, program (that is, .exe or .com file), or batch program (that is, .bat or .cmd file) that you want to run. When the command requires a path as an argument, use the absolute path (that is, the entire path beginning with the drive letter). If the command is on a remote computer, specify Universal Naming Convention (UNC) notation for the server and share name, rather than a remote drive letter.

Attrib
Displays, sets, or removes the read-only, archive, system, and hidden attributes assigned to files or directories. Used without parameters, attrib displays attributes of all files in the current directory.

Syntax:
attrib [{+r|-r}] [{+a|-a}] [{+s|-s}] [{+h|-h}]
[[Drive:][Path] FileName] [/s[/d]]
+r: Sets the read-only file attribute.
-r: Clears the read-only file attribute.
+a: Sets the archive file attribute.
-a: Clears the archive file attribute.
+s: Sets the system file attribute.

-s: Clears the system file attribute.
+h: Sets the hidden file attribute.
-h: Clears the hidden file attribute.
[ Drive : ][ Path ] FileName: Specifies the location and name of the directory, file, or set of files for which you want to display or change attributes. You can use wildcard characters (that is, ? and *) in the FileName parameter to display or change the attributes for a group of files.
/s: Applies attrib and any command-line options to matching files in the current directory and all of its subdirectories.
/d: Applies attrib and any command-line options to directories.

Bootcfg
Configures, queries, or changes Boot.ini file settings.

Syntax:
bootcfg /[sub-utility]
Sub-utilities:
/Copy
Makes a copy of an existing boot entry [operating systems] section for which you can add OS options to.
/Delete
Deletes an existing boot entry in the [operating systems] section of the BOOT.INI file. You must specify the entry# to delete.
/Query
Displays the current boot entries and their settings.
/Raw
Allows you to specify any switch options to be added for a specified boot entry.
/Timeout
Allows you to change the Timeout value.
/Default
Allows you to change the Default boot entry.
/EMS
Allows you to configure the /redirect switch for headless support
for a boot entry.
/Debug
Allows you to specify the port and baud rate for remote debugging
for a specified boot entry.
/Addsw
Allows you to add predefined switches for a specific boot entry.
/Rmsw
Allows you to remove predefined switches for a specific boot entry.
/Dbg1394
Allows you to configure 1394 port debugging for a specified boot
entry.

Chkdsk
Creates and displays a status report for the disk. Also lists and corrects errors on the disk. Used without parameters, chkdsk displays the status of the disk in the current drive.

Syntax:
chkdsk [drive:] [/p] [/r]
drive: Specifies the drive that you want chkdsk to check.
/p: Performs an exhaustive check even if the drive is not marked for chkdsk to run. This parameter does not make any changes to the drive.
/r: Locates bad sectors and recovers readable information.
Implies /p.

Cipher
Displays or alters the encryption of folders and files on NTFS volumes.
Used without parameters, cipher displays the encryption state of the current folder and any files it contains.

Syntax:
cipher [{/e|/d}] [/s:dir] [/a] [/i] [/f] [/q] [/h]
[/k] [/u[/n]] [PathName [...]] |
[/r:PathNameWithoutExtension] | [/w:PathName]
/e: Encrypts the specified folders. Folders are marked so that files that are added to the folder later are encrypted too.
/d: Decrypts the specified folders. Folders aremarked so that files that are added to the folder later are encrypted too.
/s: dir: Performs the selected operation in the specified folder and all subfolders.
/a: Performs the operation for files and directories.
/i: Continues performing the specified operation even after errors occur. By default, cipher stops when it encounters an error.
/f: Forces the encryption or decryption of all specified objects. By default, cipher skips files that have been encrypted or decrypted already.
/q: Reports only the most essential information.
/h: Displays files with hidden or system attributes. By default, these files are not encrypted or decrypted.
/k: Creates a new file encryption key for the user running cipher.
If you use this option, cipher ignores all of the other options.
/u: Updates the user’s file encryption key or recovery agent’s key to the current ones in all of the encrypted files on local drives (that is, if the keys have been changed). This option only works with /n.
/n: Prevents keys from being updated. Use this option to find all of the encrypted files on the local drives. This option only works with /u.
PathName: Specifies a pattern, file, or folder.
/r: PathNameWithoutExtension: Generates a new recovery agent certificate and private key, and then writes them to files with the file name specified in PathNameWithoutExtension. If you use this option, cipher ignores all of the other options.
/w: PathName: Removes data on unused portions of a volume. PathName can indicate any directory on the desired volume. If you use this option, cipher ignores all of the other options.

Comp
Compares the contents of two files or sets of files byte by byte. Used without parameters, comp prompts you to enter the files to compare.

Syntax:
comp [data1] [data2] [/d] [/a] [/l] [/n=number] [/c]
data1: Specifies the location and name of the first file or set of files you want to compare. You can use wildcard characters (* and ?) to specify multiple files.
data2: Specifies the location and name of the second file or set of files you want to compare. You can use wildcard characters (* and ?) to specify multiple files.
/d: Displays differences in decimal format. (The default format is hexadecimal.)
/a: Displays differences as characters.
/l: Displays the number of the line on which a difference occurs, instead of displaying the byte offset.
/n= number: Compares the first number of lines of both files, even if the files are different sizes.
/c: Performs a comparison that is not case-sensitive. Compact Displays and alters the compression of files or directories on NTFS partitions. Used without parameters, compact displays the compression state of the current directory.

Syntax:
compact [{/c|/u}] [/s[:dir]] [/a] [/i] [/f] [/q]
[FileName[...]]
/c: Compresses the specified directory or file.
/u: Uncompresses the specified directory or file.
/s:dir: Specifies that the requested action (compress or uncompress) be applied to all subdirectories of the specified directory, or of the current directory if none is specified.
/a: Displays hidden or system files.
/i: Ignores errors.
/f: Forces compression or uncompression of the specified directory or file. This is used in the case of a file that was partly compressed when the operation was interrupted by a system crash. To force the file to be compressed in its entirety, use the /c and /f parameters and specify the partially compressed file.
/q: Reports only the most essential information.
FileName: Specifies the file or directory. You can use multiple file names and wildcard characters (* and ?).

Copy
Copies one or more files from one location to another.

Syntax:
copy [/d] [/v] [/n] [{/y|/-y}] [/z] [{/a|/b}]
Source [{/a|/b}] [+ Source [{/a|/b}] [+ ...]]
[Destination [{/a|/b}]]
/d: When copying an encrypted file, decrypts the copy.
/v: Verifies that new files are written correctly.
/n: Uses a short file name, if available, when copying a file with a name longer than eight characters, or with a file extension longer than three characters.
/y: Suppresses prompting to confirm that you want to overwrite an existing destination file.
/-y: Prompts you to confirm that you want to overwrite an existing destination file.
/z: Copies networked files in restartable mode.
/a: Indicates an ASCII text file.
/b: Indicates a binary file.

Fc
Compares two files and displays the differences between them.

Syntax:
fc [/a] [/b] [/c] [/l] [/lbn] [/n] [/t] [/u] [/w]
[/nnnn] [drive1:][path1]filename1
[drive2:][path2]filename2
/a: Abbreviates the output of an ASCII comparison. Instead of displaying all of the lines that are different, fc displays only the first and last line for each set of differences.
/b: Compares the files in binary mode. Fc compares the two files byte by byte and does not attempt to resynchronize the files after finding a mismatch. This is the default mode for comparing files that have the following file extensions: .exe, .com, .sys, .obj, .lib, or .bin.
/c: Ignores the case of letters.
/l: Compares the files in ASCII mode. Fc compares the two files line by line and attempts to resynchronize the files after finding a mismatch. This is the default mode for comparing files, except files with the following file extensions: .exe, .com, .sys, .obj, .lib, or .bin.
/lb n: Sets the n number of lines for the internal line buffer. The default length of the line buffer is 100 lines. If the files that you are comparing have more than this number of consecutive differing lines, fc cancels the comparison.
/n: Displays the line numbers during an ASCII comparison.
/t: Prevents fc from converting tabs to spaces. The default behavior is to treat tabs as spaces, with stops at each eighth character
position.
/u: Compares files as Unicode text files.
/w: Compresses white space (that is, tabs and spaces) during the comparison. If a line contains many consecutive spaces or tabs, /w treats these characters as a single space. When used with the /w command-line option, fc ignores (and does not compare) white space at the beginning and end of a line.
/ nnnn: Specifies the number of consecutive lines that must match before fc considers the files to be resynchronised. If the number of matching lines in the files is less than nnnn, fc displays the matching lines as differences. The default value is 2.
[drive1: ][ path1 ] filename1: Specifies the location and name of the first file you want to compare. Filename1 is required.
[drive2: ][ path2 ] filename2: Specifies the location and name of the second file you want to compare. Filename2 is required.

Expand
Expands one or more compressed files. This command is used to retrieve compressed files from distribution disks.

Syntax:
expand [-r] Source [Destination]
expand -d source.cab [-f:files]
expand source.cab -f:files Destination
-r: Renames expanded files.
-d: Displays a list of files in the source location. Does not expand or extract the files.
-f: files: Specifies the files in a cabinet (.cab) file you want to
expand. You can use wildcards (* and ?).

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

Syntax:
find [/v] [/c] [/n] [/i] “string” [[Drive:][Path]
FileName[...]]
/v: Displays all lines that do not contain the specified string.
/c: Counts the lines that contain the specified string and displays the total.
/n: Precedes each line with the file’s line number.
/i: Specifies that the search is not case-sensitive.
“string”: Required. Specifies the group of characters that you want to search for. You must enclose string in quotation marks (that is, “string”).
[ Drive : ][ Path ] FileName: Specifies the location and name of the file in which to search for the specified string.

Ftp
Transfers files to and from a computer running a File Transfer Protocol (FTP) server service such as Internet Information Services. Ftp can be used interactively or in batch mode by processing ASCII text files.

Syntax:
ftp [-v] [-d] [-i] [-n] [-g] [-s:FileName] [-a] [-
w:WindowSize] [-A] [Host]
-v: Suppresses the display of FTP server responses.
-d: Enables debugging, displaying all commands passed between the FTP client and FTP server.
-i: Disables interactive prompting during multiple file transfers.
-n: Suppresses the ability to log on automatically when the initial connection is made.
-g: Disables file name globbing. Glob permits the use of the asterisk (*) and question mark (?) as wildcard characters in local file and path names.
-s: FileName: Specifies a text file that contains ftp commands. These commands run automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of redirection (<).
-a: Specifies that any local interface can be used when binding the FTP data connection.
-w: WindowSize: Specifies the size of the transfer buffer. The default window size is 4096 bytes.
-A: Logs onto the FTP server as anonymous.
Host: Specifies the computer name, IP address, or IPv6 address of the FTP server to which to connect. The host name or address, if specified, must be the last parameter on the line.

Ipconfig
Displays all current TCP/IP network configuration values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig displays the IP address, subnetmask, and default gateway for all adapters.

Syntax:
ipconfig [/all] [/renew [Adapter]] [/release
[Adapter]] [/flushdns] [/displaydns] [/registerdns]
[/showclassid Adapter] [/setclassid Adapter
[ClassID]]
/all: Displays the full TCP/IP configuration for all adapters.
Without this parameter, ipconfig displays only the IP address, subnet mask, and default gateway values for each adapter. Adapters can represent physical interfaces, such as installed network adapters, or logical interfaces, such as dial-up connections.
/renew [ Adapter]: Renews DHCP configuration for all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.
/release [ Adapter]: Sends a DHCPRELEASE message to the DHCP server to release the current DHCP configuration and discard the IP address configuration for either all adapters (if an adapter is not specified) or for a specific adapter if the Adapter parameter is included. This parameter disables TCP/IP for adapters configured to obtain an IP address automatically. To specify an adapter name, type the adapter name that appears when you use ipconfig without parameters.
/flushdns: Flushes and resets the contents of the DNS client resolver cache. During DNS troubleshooting, you can use this procedure to discard negative cache entries from the cache, as well as any other entries that have been added dynamically.
/displaydns: Displays the contents of the DNS client resolver cache, which includes both entries preloaded from the local Hosts file and any recently obtained resource records for name queries resolved by the computer. The DNS Client service uses this information to resolve frequently queried names quickly, before querying its configured DNS servers.
/registerdns: Initiates manual dynamic registration for the DNS names and IP addresses that are configured at a computer. You can use this parameter to troubleshoot a failed DNS name registration or resolve a dynamic update problem between a client and the DNS server without rebooting the client computer. The DNS settings in the advanced properties of the TCP/IP protocol determine which names are registered in DNS.
/showclassid Adapter: Displays the DHCP class ID for a specified adapter. To see the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of Adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically.
/setclassid Adapter [ ClassID ]: Configures the DHCP class ID for a specified adapter. To set the DHCP class ID for all adapters, use the asterisk (*) wildcard character in place of Adapter. This parameter is available only on computers with adapters that are configured to obtain an IP address automatically. If a DHCP class ID is not specified, the current class ID is
removed.

Label
Creates, changes, or deletes the volume label (that is, the name) of a disk. Used without parameters, label changes the current volume label or deletes the existing label.

Syntax:
label [Drive:][label]
label [/MP][volume][label]
Drive: Specifies the drive letter (followed by a colon) of the disk you want to name.
label: Specifies the name for the volume.
/MP: Specifies that the volume should be treated as amount point or volume name.
volume: Specifies the drive letter (followed by a colon), mount point, or volume name. If a volume name is specified, the /MP parameter is unnecessary.

Netstat
Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.

Syntax:
netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-
s] [Interval]
-a: Displays all active TCP connections and the TCP and UDP ports on which the computer is listening.
-e: Displays Ethernet statistics, such as the number of bytes and packets sent and received. This parameter can be combined with - s.
-n: Displays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.
-o: Displays active TCP connections and includes the process ID (PID) for each connection. You can find the application based on the PID on the Processes tab in Windows Task Manager. This parameter can be combined with -a, -n, and -p.
-p Protocol: Shows connections for the protocol specified by Protocol. In this case, the Protocol can be tcp, udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, Protocol can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.
-s: Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols. If the IPv6 protocol for Windows XP is installed, statistics are shown for the TCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -p parameter can be used to specify a set of protocols.
-r: Displays the contents of the IP routing table. This is equivalent to the route print command.
Interval: Redisplays the selected information every Interval seconds. Press CTRL+C to stop the redisplay. If this parameter is omitted, netstat prints the selected information only once.

Net Services
Many services use networking commands that begin with the word net. Get a list of all available net commands by typing net/? at a command prompt.

Example:
net start
Pagefileconfig.vbs
Enables an administrator to display and configure a system’s paging file Virtual Memory settings. Changes a system’s existing paging file Virtual Memory settings.

Syntax:
pagefileconfig[.vbs] /change [/s Computer [/u
Domain\User [/p Password]]] {[/iInitialPageFileSize]
|[/m MaximumPageFileSize]} /vo {VolumeLetter|*}
[/vo {VolumeLetter2|*} [...]]
/s Computer: Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u Domain \ User: Runs the script with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p Password: Specifies the password of the user account that is specified in the /u parameter.
/i InitialPageFileSize: Specifies the new initial size (in MB) to use for the paging file specified.
/m MaximumPageFileSize: Specifies the new maximum size (in MB) to use for the paging file specified.
/vo { VolumeLetter |*}: Specifies the volume or volumes of the paging file settings to be changed. The volume is specified by a letter followed by a colon (for example, “C:”).

Ping
Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) Echo Request messages. Ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution.

Syntax:
ping [-t] [-a] [-n Count] [-l Size] [-f] [-i TTL]
[-v TOS] [-r Count] [-s Count] [{-j HostList | -k
HostList}] [-w Timeout] [TargetName]
-t: Specifies that ping continue sending Echo Requestmessages to the destination until interrupted. To interrupt and display statistics, press CTRL-BREAK. To interrupt and quit ping, press CTRL-C.
-a: Specifies that reverse name resolution is performed on the destination IP address. If this is successful, ping displays the corresponding host name.
-n Count: Specifies the number of Echo Request messages sent. The default is 4.
-l Size: Specifies the length, in bytes, of the Data field in the Echo Request messages sent. The default is 32. The maximum size is 65,527.
-f: Specifies that Echo Request messages are sent with the Don’t Fragment flag in the IP header set to 1. The Echo Request message cannot be fragmented by routers in the path to the destination. This parameter is useful for troubleshooting path Maximum
Transmission Unit (PMTU) problems.
-i TTL: Specifies the value of the TTL field in the IP header for Echo Request messages sent. The default is the default TTL value for the host. For Windows XP hosts, this is typically 128. The maximum TTL is 255.
-v TOS: Specifies the value of the Type of Service (TOS) field in the IP header for Echo Request messages sent. The default is 0. TOS is specified as a decimal value from 0 to 255.
-r Count: Specifies that the Record Route option in the IP header is used to record the path taken by the Echo Request message and corresponding Echo Reply message. Each hop in the path uses an entry in the Record Route option. If possible, specify a Count that is equal to or greater than the number of hops between the source and destination. The Count must be a minimum of 1 and a maximum of 9.
-s Count: Specifies that the Internet Timestamp option in the IP header is used to record the time of arrival for the Echo Request message and corresponding Echo Reply message for each hop. The Count must be a minimum of 1 and a maximum of 4.
-j HostList: Specifies that the Echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in HostList. With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The host list is a series of IP addresses (in dotted decimal notation) separated by spaces.
-k HostList: Specifies that the Echo Request messages use the Strict Source Route option in the IP header with the set of intermediate destinations specified in HostList.With strict source routing, the next intermediate destination must be directly reachable (it must be a neighbor on an interface of the router). The maximum number of addresses or names in the host list is 9. The host list is a series of IP addresses (in dotted decimal notation) separated by spaces.
-w Timeout: Specifies the amount of time, in milliseconds, to wait for the Echo Reply message that corresponds to a given Echo Request message to be received. If the Echo Reply message is not received within the time-out, the “Request timed out” error message is displayed. The default time-out is 4000 (4 seconds).
TargetName: Specifies the destination, which is identified either by IP address or host name.

Replace
Replaces files in the destination directory with files in the source directory that have the same name. You can also use replace to add unique file names to the destination directory.

Syntax:
replace [drive1:][path1] FileName [drive2:][path2]
[/a] [/p] [/r] [/w]
replace [drive1:][path1] FileName [drive2:][path2]
[/p] [/r] [/s] [/w] [/u]
[ drive1 : ][ path1 ] FileName: Specifies the location and name of the source file or set of files.
[ drive2 : ][ path2 ]: Specifies the location of the destination file. You cannot specify a file name for files you replace. If you specify neither a drive nor a directory, replace uses the current drive and directory as the destination.
/a: Adds new files to the destination directory instead of replacing existing files. You cannot use this command-line option with the /s or /u command-line option.
/p: Prompts you for confirmation before replacing a destination file or adding a source file.
/r: Replaces read-only files as well as unprotected files. If you do not specify this command-line option but attempt to replace a read-only file, an error results and stops the replacement operation.
/w: Waits for you to insert a disk before replace begins to search for source files. If you do not specify /w, replace begins replacing or adding files immediately after you press [Enter].
/s: Searches all subdirectories of the destination directory and replaces matching files. You cannot use the /s command-line option with the /a command-line option. The replace command does not search subdirectories specified in path1.
/u: Replaces (updates) only those files on the destination directory that are older than those in the source directory. You cannot use the /u command-line option with the /a command-line option.

SC
Communicates with the Service Controller and installed services. SC.exe retrieves and sets control information about services. You can use SC.exe for testing and debugging service programs.

Syntax:
sc /command [ServiceName]
Commands:
Query: Queries the status for a service, or enumerates the status for types of services.
Queryex: Queries the extended status for a service, or enumerates the status for types of services.
Start: Starts a service.
Pause: Sends a PAUSE control request to a service.
Interrogate: Sends an INTERROGATE control request to a service.
Continue: Sends a CONTINUE control request to a service.
Stop: Sends a STOP request to a service.
Config: Changes the configuration of a service (persistant).
Description: Changes the description of a service.
Failure: Changes the actions taken by a service upon failure.
Qc: Queries the configuration information for a service.
Qdescription: Queries the description for a service.
Qfailure: Queries the actions taken by a service upon failure.
Delete: Deletes a service (from the registry).
Create: Creates a service. (adds it to the registry).
Control: Sends a control to a service.
Sdshow: Displays a service’s security descriptor.
Sdset: Sets a service’s security descriptor.
GetDisplayName: Gets the DisplayName for a service.
GetKeyName: Gets the ServiceKeyName for a service.
EnumDepend: Enumerates Service Dependencies.
The following commands don’t require a service name:
Boot (ok | bad): Indicates whether the last boot should be
saved as the last-known-good boot configuration
Lock: Locks the Service Database
QueryLock: Queries the LockStatus for the SCManager Database

Shutdown
Allows you to shut down or restart a local or remote computer. Used without parameters, shutdown will logoff the current user.

Syntax:
shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]]
[-t xx] [-c “message”] [-d[u][p]:xx:yy]
-l: Logs off the current user, this is also the defualt. -m ComputerName takes precedence.
-s: Shuts down the local computer.
-r: Reboots after shutdown.
-a: Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.
-f: Forces running applications to close.
-m [ \\ ComputerName ]: Specifies the computer that you want to shut down.
-t xx: Sets the timer for system shutdown in xx seconds. The default is 20 seconds.
-c “message”: Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.
-d [ u ][ p ] : xx : yy: Lists the reason code for the shutdown:
u: Indicates a user code.
p: Indicates a planned shutdown code.
xx: Specifies the major reason code (0-255).
yy: Specifies the minor reason code (0-65536).

Taskkill
Ends one or more tasks or processes. Processes can be killed by process ID or image name.

Syntax:
taskkill [/s Computer] [/u Domain\User [/p
Password]]] [/fi FilterName] [/pid ProcessID]|[/im
ImageName] [/f][/t]
/s Computer: Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u Domain \ User: Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p Password: Specifies the password of the user account that is specified in the /u parameter.
/fi FilterName: Specifies the types of process(es) to include in or exclude from termination.

Tracert
Determines the path taken to an Internet or intranet destination by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination. The path displayed is the list of nearside router interfaces of the routers in the path between a source host and a destination. The near-side interface is the interface of the router that is closest to the sending host in the path.

Syntax:
tracert [-d] [-h MaximumHops] [-j HostList] [-w
Timeout] [TargetName]
-d: Prevents tracert fromattempting to resolve the IP addresses of intermediate routers to their names. This can speed up the display of tracert results.
-h MaximumHops: Specifies the maximum number of hops in the path to search for the target (destination). The default is 30 hops.
-j HostList: Specifies that Echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in HostList. With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The HostList is a series of IP addresses (in dotted decimal notation) separated by spaces.
-w Timeout: Specifies the amount of time in milliseconds to wait for the ICMP Time Exceeded or Echo Reply message corre- sponding to a given Echo Request message to be received. If not received within the time-out, an asterisk (*) is displayed. The default time-out is 4000 (4 seconds).
TargetName: Specifies the destination, identified either by IP address or host name.

Tree
Graphically displays the directory structure of a path or of the disk in a drive.

Syntax:
tree [Drive:][Path] [/f] [/a]
Drive: Specifies the drive that contains the disk for which you want to display the directory structure.
Path: Specifies the directory for which you want to display the directory structure.
/f: Displays the names of the files in each directory.
/a: Specifies that tree is to use text characters instead of graphic characters to show the lines linking subdirectories.

Using The Command Prompt Smartly
Some handy command prompt shortcuts to get you cmd-ing like the pros:
Use [F7] to open a list of your last used commands – very handy if you’ve used many commands and/or keep forgetting syntaxes. If you already know a command number, use [F9] and enter the command number to run it.

Use [F1] to repeat the characters of the previous command one by one. To repeat more characters, use [F2] and indicate the character up to which you want to copy the previous command. For example, if the previous command is ping 128.128.17.12, and you want to ping 128.128.19.11, just use [F2] and [7] to copy everything before the 7.

How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent

Verification:
Enter the security code shown below:
img


Add comment
Comments


Popular Articles
  1. List of IrfanView Shortcuts
  2. When replying to a message in Outlook, a copy goes into the Inbox
  3. Precautions to take while using internet in Cyber Cafes
  4. List of uTorrent Shortcuts
  5. BIOS Beep Codes for AMIBIOS (American Megatrends Inc.) and Award BIOS
No popular articles found.