Windows Server 2008 R2 Command-line Tools

From Techotopia
Revision as of 19:00, 1 April 2011 by Neil (Talk | contribs) (Accessing the Command Window)

Jump to: navigation, search
PreviousTable of ContentsNext
Performing a Windows Server 2008 R2 UpgradeConfiguring BitLocker Drive Encryption on Windows Server 2008 R2


<google>BUY_WINSERV_2008R2</google>

Just like all other versions of Windows, Windows Server 2008 R2 provides the user with the option to execute commands from a command-prompt window. This chapter of Windows Server 2008 R2 Essentials is intended to provide an overview of the different commands currently provided in the command-prompt.


Contents


Accessing the Command Window

<google>WIN28BOX</google> On an installed and running system the Windows command-prompt window may be accessed from the main panel of the Start menu. In this scenario the command-prompt may be launched with or without administrative privileges. By default the tool will start without administrative privileges. To launch with privileges, right click on the item in the start menu and select Run as administrator from the popup menu.

The command-prompt may also be accessed during the Windows Server 2008 R2 installation process by pressing Shift+F10 at any point before the actual installation process begins (i.e. the point at which the Setup program starts copying files).

Once invoked, the command prompt window will appear as illustrated in the following figure:

The Windows Server 2008 Command Prompt

Windows Server 2008 Command-line Tool Summary

The following table provides a list of each command line tool together with a brief explanation: <google>ADSDAQBOX_FLOW</google>

Command Description
ArpDisplay and modify the IP to physical address translation tables used by the Address Resolution Protocol (ARP).
AssocDisplay and modify file extension associations.
AttribDisplay and change file attributes.
BreakConfigure extended Ctrl-C checking.
BcdeditConfigure properties in name database to control boot loading.
CaclsDisplay or modify access control lists of files.
CallCall a script or script label as a procedure.
CD/ChdirDisplay the name of or changes the current directory.
ChcpDisplay or set the active code page number.
ChkdskCheck a disk for errors and display a report.
ChkntfsDisplay the status of volumes. Set or exclude volumes from automatic system checking during system boot.
ChoiceCreate a selection list from which users can select a choice in batch scripts.
ClsClear the console window.
CmdStart a new instance of the Windows command shell.
ColorSet the colors of the command-shell window.
CompCompare the contents of two files or sets of files.
CompactDisplay or modify the compression of files or sets of files.
ConvertConvert FAT volumes to NTFS.
CopyCopy or combine files.
DateDisplay or set the system date.
DelDelete one or more files.
DirDisplay a list of files and subdirectories within a directory.
DiskcompCompare the contents of two floppy disks.
DiskcopyCopy the contents of one floppy disk to another.
DiskpartInvoke a text-mode command interpreter so that you can manage disks, partitions, and volumes using a separate command prompt and commands that are internal to Diskpart.
DoskeyEdit command lines, recall Windows commands, and create macros.
DriverqueryDisplay the current device driver properties and status.
EchoDisplay messages, or turns command echoing on or off.
EndlocalEnd localization of environment changes in a batch file.
EraseSee Del.
ExitExit the command interpreter.
ExpandUncompress files.
FCCompare two files and display the differences between them.
Find/FindstrSearch for a text string in files.
ForRun a specified command for each file in a set of files.
FormatFormat a floppy disk or hard drive.
FsutilFile system utility - displays and configures file system properties.
FtpTransfer files.
FtypeDisplay or modify file types used in file extension associations
GotoDirect the Windows command interpreter to a labeled line in a script.
GpresultDisplay Group Policy information for a machine or user.
GraftablEnable Windows to display extended character sets in graphics mode.
HelpDisplay Help information for Windows commands.
HostnameDisplay the computer name.
ICACLSDisplay, modify, backup, and restore ACLs for files and directories.
IFPerform conditional processing in batch programs.
IpconfigDisplay TCP/IP configuration.
LabelCreate, change, or delete the volume label of a disk.
Md/MkdirCreate a directory or subdirectory.
MklinkCreate symbolic and hard links.
ModeConfigure a system device.
MoreDisplay output one screen at a time.
MountvolManage a volume mount point.
MoveMove files from one directory to another directory on the same drive.
OpenfilesDisplay files opened by remote users for a file share.
NbtstatDisplay status of NetBIOS.
Net AccountsManage user account and password policies.
Net ComputerAdd or remove computers from a domain.
Net Config ServerDisplay or modify configuration of Server service.
Net Config WorkstationDisplay or modify configuration of Workstation service.
Net ContinueResume a paused service.
Net FileDisplay or manage open files on a server.
Net GroupDisplay or manage global groups.
Net LocalgroupDisplay or manage local group accounts.
Net PauseSuspend a service.
Net PrintDisplay or manage print jobs and shared queues.
Net SessionList or disconnect sessions.
Net ShareDisplay or manage shared printers and directories.
Net StartList or start network services.
Net StatisticsDisplay workstation and server statistics.
Net StopStop services.
Net TimeDisplay or synchronize network time.
Net UseDisplay or manage remote connections.
Net UserDisplay or manage local user accounts.
Net ViewDisplay network resources or computers.
NetshInvoke a separate command prompt that allows you to manage the configuration of various network services on local and remote computers.
NetstatDisplay status of network connections.
PathDisplay or set a search path for executable files in the current command window.
PathpingTrace routes and provides packet loss information.
PauseSuspend processing of a script and wait for keyboard input.
PingDetermine if a network connection can be established.
PopdChange to the directory stored by Pushd.
PrintPrint a text file.
PromptChange the Windows command prompt.
PushdSave the current directory then changes to a new directory.
Rd/RmdirRemove a directory.
RecoverRecover readable information from a bad or defective disk.
Reg AddAdd a new subkey or entry to the Registry.
Reg CompareCompare Registry subkeys or entries.
Reg CopyCopy a Registry entry to a specified key path on a local or remote system.
Reg DeleteDelete a subkey or entries from the Registry.
Reg QueryList the entries under a key and the names of subkeys (if any).
Reg RestoreWrite saved subkeys and entries back to the Registry.
Reg SaveSave a copy of specified subkeys, entries, and values to a file.
Regsvr32Register and unregister DLLs.
RemAdd comments to scripts.
RenRename a file.
ReplaceReplace a file.
RouteManage network routing tables.
RmdirRemove a directory.
SetDisplay or modify Windows environment variables. Also used to evaluate numeric expressions at the command line.
SetlocalBegin localization of environment changes in a batch file.
ScDisplay and configure background processes (services).
SchtasksSchedule commands and programs to run on a system.
SfcScans and verifies protected operating system files.
ShiftShifts the position of replaceable parameters in scripts.
ShutdownPerform system shutdown.
SortSort input.
StartStart a new command-shell window to run a specified program or command.
SubstMaps a path to a drive letter.
SysteminfoDisplay machine properties and configuration.
TasklistDisplay currently running tasks and services.
TaskkillKill or stop a running process or application.
TimeDisplay or sets the system time.
TitleSets the title for the command-shell window.
TracertDisplay the path between computers.
TreeGraphically displays the directory structure of a drive or path.
TypeDisplay the contents of a text file.
VerDisplay the Windows version.
VerifyTells Windows whether to verify that your files are written correctly to a disk.
VolDisplay a disk volume label and serial number.
XcopyCopy files and directories.
WMIDisplay WMI information.

Displaying a List of Commands

A list of commands may be obtained at any time by typing help into the command prompt window.

Obtaining Help Information about Command-line Tools

Help on command line tools can be obtained using the Help system as follows:

help ftp

help xcopy

Alternatively enter the name of the command followed by '/?'. For example, to display help information for the Net command:

net /?

To obtain information on a particular command line argument for a command simply enter the command name, the argument and the '/?':

net time /?

<google>BUY_WINSERV_2008R2_BOTTOM</google>