- The Windows 2000\XP\.NET Resource Index
Home | About Us | Search

Last Updated November 10, 2008

  Batch Files
  Command Line
  Env Variable
  Logon & Auth
  Logon Scripts
  Password Mgmt
  Run As
  Scheduling Service
  Time Synch











Windows 2000 Command Line Tools

Any Administrator raised on Unix always complains about the lack of command line functionality in Windows NT. But there's hope - Microsoft has promised to make all of the GUI functions available from the command line, and in Windows 2000 there about 85% of the way there.  Here's our collection of syntax references, as well as command line tricks, troubleshooting advice, and bugs.

Did you know command line tools can be used to monitor AD replication? Check out this article from to learn more:

Where to Start...

Commanding NT's Command Line
Perl's powerful text processing capabilities can put you back in control of NT's command line. Source: Windows 2000 Magazine (May 1999)

Terminal Services Client Command-Line Switches
Microsoft Knowledge Base Article: 255898 - This article describes the command-line switches for installing and maintaining the Remote Desktop Protocol (RDP) Terminal Services client. 

Windows 2000 Command Reference
A complete list of all of the native Windows 2000 commands and their syntax.

Win2K Command-Line Utilities
Take stock of Win2K's most valuable utilities that you run from the command line. Source: Windows 2000 Magazine (December 20, 2000)

How to....
2 Ways to Force Logoffs from the Command Line
Supplement 4 tools let you force logoffs locally or remotely. Source: Windows 2000 Magazine (Aug 2000)

Command-Line Switches for the Microsoft Windows Installer Tool
Microsoft Knowledge Base Article: 227091 - The Windows Installer executable program that interprets packages and installs products is Msiexec.exe. This article lists the command-line switches for this program. You cannot run the Msiexec.exe program without specifying at least one switch.

Command-Line Parameters Which Support Connection Manager Profile Installation Procedures 
Microsoft Knowledge Base Article: 266793 - Command-line parameters are used to support the installation of profiles that are created using the Connection Manager Administration Kit (CMAK -. There are several command-line parameters that administrators may use to install CMAK profiles 

How to Create and Start a Service on a Remote Computer By Using the Command-Line or a Script 
Microsoft Knowledge Base Article: 252340 -
This article describes how to create and start a service remotely on a Windows NT-based or Windows 2000-based computer from the command line. In this scenario, the program file resides on all the remote computers; you want to write a script to create and start the service automatically. 

How to Change User Password at Command Prompt
Microsoft Knowledge Base Article: 149427 - Only administrators can change domain passwords at the Windows NT command prompt with the NET USER command. To change a user's password at the command prompt, log on as an administrator and type: NET USER <UserName> * /domain. You will then be prompted to type a password for the user. Enter the NEW password, not the existing password. 

How to Change a Computer's Domain Name System Server from the Command Line
Microsoft Knowledge Base Article: 290396 - This article describes how to change a computer's Domain Name System (DNS) server or servers from the command line, either locally or remotely. This operation requires you to use the Regfind.exe tool from either the Microsoft Windows NT Server Resource Kit or the Microsoft Windows 2000 Server Resource Kit. 

How to Close All Files Opened by Network Clients from the Command Line
Microsoft Knowledge Base Article: 290585 - This article describes how to close all open files on a Windows NT 4.0-based computer or Windows 2000-based computer from the command line. You can use this command to close files on the computer where the files reside, which you may find most useful when you run it prior to backup procedures in environments where users do not log off, disconnect, or close files prior to scheduled backup procedures. This command only affects files that are open from SMB clients. It does not affect interprocess communication (IPC) or remote procedure call (RPC) connections, HTTP requests, or files that are in use by FTP clients 

HOW TO: Compress and Expand Files and Folders in Windows 2000 with the COMPRESS, COMPACT, and EXPAND Commands  
Microsoft Knowledge Base Article: 314958 - This step-by-step article describes how to use the compact and the compress commands to compress files and folders in Microsoft Windows 2000. 

How to Enable Automatic Complete for the Command Prompt (Cmd.exe)
Microsoft Knowledge Base Article: 244407 - File name completion and folder name completion are quick-search features of the Windows NT command processor, Cmd.exe. When you type a path or a file name and then press TAB, Cmd.exe searches for all files whose path and file name match 

How to Lock a Workstation from the Command Line
Microsoft Knowledge Base Article: 262646 - This article describes how to lock a Windows 2000-based workstation from the command line. 

How to Open Control Panel Folders from the Command Prompt
Microsoft Knowledge Base Article: 180025 -
This article describes how to start Control Panel applications and/or open folders at the MS-DOS command prompt. 

How to Run a Domain Logon Script in the Foreground with the Start.exe Command-Line Tool
Microsoft Knowledge Base Article: 265016 - By default, logon scripts run in the background. You can use the Start.exe command-line tool to run local and domain logon scripts on computers that are running Microsoft Windows 95, Microsoft Windows 98, Microsoft Windows NT 4.0, and Windows2000 

How to Use a Command Prompt During GUI-Mode Setup
Microsoft Knowledge Base Article: 242380 - This article describes how to gain access to a command prompt during GUI-mode Setup. 

How to Use Property Reference Command-Line Parameters with Msiexec.exe 
Microsoft Knowledge Base Article: 230781 - It is possible to perform all Microsoft Windows Installer functions at a command prompt by using Msiexec.exe. You can use many property command-line switches to perform different functions or set certain variables. Some examples include setting the Company Name variable and applying patches or transforms

How to Use the Netsh.exe Tool and Command-Line Switches
Microsoft Knowledge Base Q242468 - Article Netsh.exe is a tool an administrator can use to configure and monitor Windows 2000-based computers at a command prompt. With the Netsh.exe tool, you can direct the context commands you enter to the appropriate helper, and the helper then carries out the command. A helper is a Dynamic Link Library (.dll) file that extends the functionality of the Netsh.exe tool by providing configuration, monitoring, and support for one or more services, utilities, or protocols. The helper may also be used to extend other helpers. 

Make and break trust relationships from the command line. Source: Windows 2000 Magazine (March 1999)

Using the More Option at a Command Prompt
Microsoft Knowledge Base Article: 227449 - When you use a command with the "|more" option at a command prompt, pressing ENTER advances only to the next line, rather than advancing by a full screen. 

Add to file and directory ACLs without replacing permissions.
Source: Windows 2000 Magazine (March 1998)


Applications Started with AT Are Not Interactive
Microsoft Knowledge Base Article: 121562 - The Windows NT 3.5 AT command does not load applications interactively even though the System Account Allow Service to Interact with Desktop check box is selected for the Scheduler service. The AT command does load the application in the background. 

Cmd.exe Shortcut Does Not Have Same "Run as" Behavior as Command Line
Microsoft Knowledge Base Article: 258948 -
When you use the Run as command from a Microsoft default shortcut whose Start in value is set to "%HOMEDRIVE%%HOMEPATH%" (a common default for shortcuts created by Windows 2000), the command does not work and generates a "The directory name is invalid" error message. This can occur if the primary user's account has a home folder that is mapped from a server share, on which the secondary user (usually the local administrator) does not have privileges

COM Port Settings in Control Panel vs. Command Prompt
Microsoft Knowledge Base Article: 112841 - The COM port settings in the Ports option of Control Panel have no effect on COM port settings used in a command prompt window. 

COPY, XCOPY, and MOVE Overwrite Functionality Changes in Windows 2000
Microsoft Knowledge Base Article: 240268 - To bring Cmd.exe into conformity with the Microsoft MS-DOS 6.x and Microsoft Windows 95 command shells (, Microsoft has added support for overwrite warnings. When you are copying or moving files from one location to another, if the files already exist in the destination folder, you receive an "overwrite" warning that prompts for confirmation before overwriting the file. This behavior is controllable with the /y switch. 

/B Switch Does Not Work Together with All DIR Commands 
Microsoft Knowledge Base Article: 240666 - When you use the dir command at a command prompt, you can use multiple switches at once. However, some switches are ignored when you use the /b switch. The /b switch uses "bare" format. 

Err Msg: "This program cannot be run in DOS mode" Trying to Run Setup.exe from Command Prompt
Microsoft Knowledge Base Article: 240251 - When you turn on your computer and then boot from a floppy disk or hard drive with CD-ROM Support enabled to a command prompt, the following error message is displayed when you try to start Setup.exe from the Windows 2000 CD-ROM: 

Effects of Using the START Command at a Command Prompt
Microsoft Knowledge Base Article: 200469 - You can open a folder in a window by typing  start foldername at a command prompt. However, if a folder named New Folder exists and you type start "new folder" at the command prompt, a new command window with the caption New Folder is opened instead of the New Folder folder 

Mouse Support in Command Session in Windows 2000
Microsoft Knowledge Base Article: 260209 - On a computer running Windows 2000, MS-DOS-based programs may not have mouse support.

MS-DOS Command Is Not Recognized in Windows 2000
Microsoft Knowledge Base Article: 225746 - When you try to run an MS-DOS utility at an MS-DOS prompt, you may receive the following error message: 

Native MS-DOS Commands and the Space Character
Microsoft Knowledge Base Article: 166827 - Windows NT and Windows 95 use different command interpreters to process commands at a command prompt. Windows NT uses Cmd.exe, and Windows 95 uses This can cause confusion when you are using native, or internal, commands (such as CHDIR, MKDIR, RMDIR, and so on) at a command prompt, particularly in conjunction with the space character 

RUNAS Command Does Not Work with UPN or Plain User Name
Microsoft Knowledge Base Article: 272472 - After you install Windows 2000 Service Pack 1, the runas command may not work correctly (whether you use the command from a command prompt or in a script). 

Running EDIT Tool Switches Directory Listing to 8.3 Format 
Microsoft Knowledge Base Article: 225126 - If you run the EDIT tool from a command prompt in a folder containing long file names, the directly listing switches to 8.3 (short file name) format when you quit the EDIT tool. Changing to a subfolder using a long file name does work, but the original folder in which you ran the EDIT tool is still shown in 8.3 format.

SUBST Command Does Not Execute in AUTOEXEC.NT
Microsoft Knowledge Base Article: 129128 - When you include Win32 binary commands in the AUTOEXEC.NT file in Windows NT, they do not execute. The AUTOEXEC.NT file runs only 16-bit DOS binary commands. 

Windows 2000 Command-Line Parameters for Msinfo32.exe
Microsoft Knowledge Base Article: 255713 - Windows 2000 includes Microsoft System Information (Msinfo32.exe), which is an updated version of the Microsoft Windows NT Diagnostics tool (Winmsd.exe). 

Entire contents
1999-2003 and TechTarget
All rights reserved

This site and its contents are Copyright 1999-2003 by Microsoft, NT, BackOffice, MCSE, and Windows are registered trademarks of Microsoft Corporation. Microsoft Corporation in no way endorses or is affiliated with The products referenced in this site are provided by parties other than makes no representations regarding either the products or any information about the products. Any questions, complaints, or claims regarding the products must be directed to the appropriate manufacturer or vendor.