AN OVERVIEW OF WINDOWS 2000 SERVER COMMANDS

Windows 2000 Server offers many commands that can be used from the Command Prompt window or from the recovery console. Some of these commands are utility commands, such as convert, which is used to convert FAT to NTFS, while others are used for troubleshooting such as chkdsk, which checks the integrity of the file systems. The following sections describe different command options in Windows 2000 Server:

General Commands

The commands presented in the following table are general commands for viewing or controlling different aspects of Windows 2000 Server. To find out more about a command, open the Command Prompt window and enter help [command], such as help assoc.

COMMAND

DESCRIPTION

assoc

Used to view and change file associations in Windows 2000

at

Enables you to schedule one or more programs to run at a designated date and time

attrib

For viewing the attributes set for a file and to change one or more attributes

break

Used for programs to set break points for debugging a problem

cacls

Enables you to view the ACL attributes set for a file and to change one or more attributes

call

Used to call a batch file from within another batch file

cd or chdir

Enables you to change to a different folder or to view the name of the current folder

chcp

Used to view the currently active code page number or to set a different code page number

chkdsk

Used to report the disk file system statistics and to correct file system errors such as lost clusters

chkntfs

Used to configure automatic checking of a disk when the system is booted

cls

Clears the information currently displayed on the screen

cmd

Used to start a new NTDVM session

color

Sets up the foreground and background screen colors

comp or fc

Enables you to compare the information in two files or in two sets of files to determine the differences in content

compact

Compresses files and subfolders within a folder or removes the compression attribute

convert

Converts a FAT formatted volume to NTFS at the time a server is booted

copy

Copies files from one disk location to another

date

Enables you to view the date and to reset it

del or erase

Deletes specified files on a volume

dir

Lists files and subfolders within a folder

diskcomp

Checks the contents of one floppy disk against the contents of another

diskcopy

Copies information on a floppy disk to another floppy disk

diskperf

Installs, starts, or stops the System Monitor disk counters

doskey

Starts the recall of previously used command line commands and is used to create command macros

echo

Shows an associated message or turns screen messages off or on

endlocal

Used in batch files to terminate the storage of command process extensions, such as error level information

exit

Used to close the Command Prompt window session

find

Used to find a designated set of characters contained in one or more files

findstr

Used to find a one or more sets of characters within a set of files

for

Used within a batch file to continually run a designated command for a list of character strings or for a group of files

format

Formats a disk for FAT or NTFS

ftype

Provides detailed information about file associations and it is used to change associations so as to link them with a designated program

goto

Used in a batch file to modify the order for running designated lines of commands

graftabl

Displays characters and code-page switching for a color display monitor

help

Provides a list of the Windows 2000 command line commands and is used to display help about a particular command

if

Used to perform a conditional test in a batch file

keyb

Enables you to set the keyboard language or layout

label

Modifies the label on a disk volume

md or mkdir

Used to set up a new folder

mode

Sets up parameters for a device or a communications port

more

Used to limit the display to one screen at a time so that information does not rush by faster than it can be read

move

Enables you to move files from one disk location to another on the same volume

path

Used to establish the path or list of folders to search in order to run a program or command

pause

Used to pause running a batch file and to display a message until a keyboard key is pressed

popd

Deletes a specified drive letter that was temporarily created by pushd

prints

Prints a designated file

prompt

Modifies the format of the command prompt shown in the Command Prompt window

pushd

Creates a temporary drive letter to a network resource

rd or rmdir

Deletes a folder or subfolder

recover

Enables you to try recovering files and data from a damaged or unreadable disk

rem

Used to place comment lines to document the contents of a batch file

ren or rename

Renames a file or a group of files

replace

Compares files in two disks or folders and synchronizes the files in one to those on another (similar to My Briefcase in earlier versions of Windows)

restore

Restores files from another computer that were backed up via the backup command on that computer

set

Shows a list of currently set environment variables and is used to modify those variables

setlocal

Used to start command process extensions via a batch file, such as for detecting error level information

shift

Used within a batch file to shift command extensions from one position to another

sort

Sorts lines input into a file, written to the screen, or sent to a printer from a file

start

Starts a new Command Prompt window in which to run a program or a command

subst

Used to link a path or volume with a designated drive letter

time

Used to view the time of day and to reset it

title

Modifies the title in the titlebar of the Command Prompt window

tree

Used to show a graphic of the folder and subfolder tree structure

type

Shows a file's contents on the screen or sends the contents to a file

ver

Shows the current version of the operating system

verify

Instructs the operating system to verify that each file is accurately written to disk at the time it is created, copied, moved, or updated

vol

Used to view the volume label, if there is one, and the volume serial number

xcopy

Designed as a fast copy program for files, folders, and subfolders

 

Network-Related Commands

The commands in the following table are used to test network connectivity and to manage network functions such as configuring services, checking shared files and file locks, and managing print jobs. Information about these commands is available by opening the Command Prompt window and typing the command followed by "/?," such as ipconfig /?.

COMMAND

DESCRIPTION

ipconfig

Displays information about the TCP/IP setup at the server

net accounts

Used to change account policy settings and to synchronize BDCs

net computer

Adds or removes a computer in a domain

net config

Shows the started services that can be configured from this command, such as the Server and Workstation services

net continue

Resumes a service that has been paused

net file

Shows the currently open shared files and file locks and is used to close designated files or to remove file locks

net group

Shows the existing global groups and is used to modify those groups

net helpmsg

Used to determine the meaning of a numeric network error message

net localgroup

Shows the existing local groups and is used to modify those groups

net name

Used to display, add, or remove computer names that can participate in the Messenger service

net pause

Pauses a service

net print

Used to view and manage queued print jobs by computer, share name, and job number

net send

Sends a message to designated users or to all users currently connected to the server

net session

Shows the users currently connected to the server and is used to disconnect designated user sessions or all user sessions

net share

Used to create, delete or show information about a shared resource

net start

Shows the started services or is used to start a designated service

net statistics

Shows the accumulated statistics about the Server or Workstation service

net stop

Stops a network service on the server

net time

Used to synchronize the server's clock with that of a another computer in the same or in a different domain; or to view the time as set on another computer in the same or in a different domain

net use

Shows information about shared resources or is used to configure, connect, and disconnect shared resources

net user

Used to view, add, or modify a user account set up on the server or in a domain

net view

Presents a list of domains, the computers and servers in a domain, and all resources shared by a computer in a domain

nbtstat

Shows the server and domain names registered to the network

netstat

Used to display information about the TCP/IP session at the server

ping

Used to poll another TCP/IP node to verify you can communicate with it

tracert

Used to view the number of hops and other routing information on the path to the specified server or host

 

Recovery Console Commands

When you boot into the recovery console to troubleshoot or repair a problem in Windows 2000 Server you can access the commands listed in the following table.

COMMAND

DESCRIPTION

attrib

Used to manage attributes

batch

Used to execute batch file commands

cd

Used to show the current folder name or change to a different folder

chdir

Same as the cd command

chkdsk

Used to verify disk files

cls

Used to clear the screen display

copy

Used to copy files

del

Used to delete files

delete

Same as the del command

dir

Used to list files and folders

disable

Used to disable a driver or service

diskpart

Used to manage disk partitions

enable

Used to enable a driver or service

exit

Used to close the recovery console and reboots the system

expand

Used to decompress a compressed file

fixboot

Used to write a new boot sector onto a partition

fixmbr

Used to fix the Master Boot Record

format

Used to format a disk

help

Used to display help information

listsvc

Used to list the enabled drivers and services

logon

Used to log onto an account

map

Used to list the drive mappings or ARC path mappings

md

Used to create a folder

mkdir

Same as the md command

more

Used to display output of one screen full of information and another screen when you press Enter

rd

Used to delete a folder

ren

Used to rename files

rename

Same as the ren command

rmdir

Same as the rd command

systemroot

Used to set the current folder to system root

type

Used to show a file's contents

 

By Michael J. Palmer Ó 1997, 1998, 1999, 2000 Course Technology, Incorporated. All rights reserved.

Top =