Abstract
This chapter provides you with a handy reference to the Windows NT commands, including descriptions of all commands accepted by NT and some tips on using command line utilities.
This appendix provides you with a handy reference to the Windows NT commands, including descriptions of all commands accepted by NT and some tips on using command line utilities. Although you can start any of NTs graphical applications from an NT Command Prompt, this appendix focuses only on command-line utilities that dont have a graphical user interface. See the section called Console Application in Chapter 8 for details on configuring the NT Command Prompt.
To find detailed syntax information on each of the Windows NT Server 4.0 commands, click Start Help and click the Contents tab. Double-click the Windows NT Commands book icon, then double-click the Windows NT Commands document icon. Search for a specific command by scrolling down the alphabetized list or click a letter to jump directly to the desired section.
You can also get online Help on commands from the Command Prompt itself. Typing HELP displays a list of one-line descriptions of several (but not all) available NT commands. If a command appears on this list, you can type HELP followed by the command name to see detailed syntax information. Most commands also accept a /? parameter. Just type the command name followed by /? to see a detailed syntax description.
WINDOWS NT COMMAND DESCRIPTIONS
Table A-1 presents a comprehensive alphabetical list of all commands accepted by Windows NT, along with a brief description of each one. Refer to online Help (as described earlier in this appendix) for detailed syntax information.
Volume, Directory, and File Manipulation Commands
The bulk of NT commands are designed to manipulate disk volumes, directories, and files. From formatting a volume to setting attribute bits on individual files, most of your command-line work will probably involve these commands. See Table A-1 for a description of each command and refer to online Help for specific command syntax information.
Note: When specifying long file and directory names, either on FAT or NTFS, you need to surround the entire name in quotes if it contains any spaces.
Here are the volume, directory, and file manipulation commands:
ASSOC
ATTRIB
CACLS
CD
CHDIR
CHKDSK
COMP
COMPACT
CONVERT
COPY
DEL
DIR
DISKCOMP
DISKCOPY
ERASE
FC
FINDSTR
FORMAT
FTYPE
LABEL
MD
MKDIR
MOVE
RD
RECOVER
REN
RENAME
REPLACE
RMDIR
TREE
TYPE
VOL
XCOPY
Both CHKDSK and CONVERT require exclusive use of the volume on which theyre operating. If the volume cant be locked for exclusive use (say, because it contains a paging file or because a database application has a file open), these utilities offer to schedule the operation to be performed at the next restart of the computer. CHKDSK causes AUTOCHK.EXE, a native NT version of CHKDSK, to scan the volume when the operating system boots the next time. Likewise, CONVERT causes AUTOCONV.EXE, a native NT version of CONVERT, to convert the volume to NTFS when the operating system boots the next time. AUTOCHK and AUTOCONV arent designed to be used from the Command Prompt theyre meant to run early in the operating system boot sequence, before the system is completely running.
Network Commands
The second largest collection of commands in NT enables you to control networking functions. The NET command is at the heart of these features. It provides such a wide variety of functions, many folks consider it a language unto itself. See Table A-1 for a description of each command and refer to online Help for specific command syntax information. (Additional network commands are provided specifically for the TCP/IP protocol. See the section called TCP/IP Commands later in this appendix.)
Note: If youre already familiar with LAN Manager 2.x, youll see many similarities between the NT and the LAN Manager network commands. However, there are quite a few differences. Click Start Help, click the Contents tab, double-click Windows NT Commands, and double-click Whats New or Different from LAN Manager? for details on what has changed in NT.
Here are the NT network commands:
IPXROUTE
NET ACCOUNTS
NET COMPUTER
NET CONFIG
NET CONTINUE
NET FILE
NET GROUP
NET HELP
NET HELPMSG
NET LOCALGROUP
NET NAME
NET PAUSE
NET PRINT
NET SEND
NET SESSION
NET SHARE
NET START
NET STATISTICS
NET STOP
NET TIME
NET USE
NET USER
Note: NET START and NET STOP are used to start and stop NT services. The service names that you use will often consist of several words separated by spaces. For example, the file-serving portion of SFM is called File Server for Macintosh. When you specify services in NET commands, you need to surround any names that contain spaces in quotation marks. Services also have short names that dont include spaces. You can opt to use these short names with the NET START and NET STOP commands.
Filter Commands
SORT, MORE, and FIND are filter commands that enable you to sort input and output, cause output to be displayed one screen at a time, and search for specified text within a file. They are different from typical NT commands in that they expect text input from the keyboard or from a file, process that input, and generate resulting output. In this sense, they act as filters for textual data.
The most common approach to using these filters involves piping the output of other utilities into the input of the filters. See the section later in this appendix called Using Windows NT Command Symbols for details on how to do this.
DOS-Oriented Commands
A number of DOS utilities have been brought into Windows NT completely untouched. In fact, theyre still implemented as 16-bit DOS code. In addition, several commands have been modified or added to configure the DOS VDM environment correctly for execution of DOS applications on NT. See Table A-1 for a description of each command and refer to online Help for specific command syntax information. Here are the DOS-oriented commands:
APPEND
BACKUP
COUNTRY
DEBUG
DEVICE
DEVICEHIGH
DOS
DOSONLY
ECHOCONFIG
EDIT
EDLIN
EXE2BIN
EXPAND
FCBS
FILES
GRAPHICS
INSTALL
LH
LOADFIX
LOADHIGH
MEM
NTCMDPROMPT
QBASIC
RESTORE
SETVER
SHELL
STACKS
SWITCHES
Environment Commands
Several NT commands are designed to control the command interpreter environment, including handling nested command interpreters and manipulating search paths and environment variables. See Table A-1 for a description of each command and refer to online Help for specific command syntax information. Here are the environment commands:
Order Your SQL Fundamentals CD Today! Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.
You've Deployed SharePoint...Now What? This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions
What Would You Do If You Ran Microsoft? ITTV's 2008 inaugural video contest, "If I Ran Microsoft..." is your chance to tell it like it is. Be goofy or be serious, but don"t miss this chance to have fun, win prizes, and go viral in a major way.
Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.