1. Launching the Command Prompt
The command prompt is pinned to the Start menu by default in Windows Server 2008. You can access it by clicking Start and selecting Command Prompt. If it has been removed from the Start menu, you can also launch it using one of these methods:
Click Start, type CMD in the Start Search box, and then press Enter.
Click Start, All Programs, Accessories, and then select Command Prompt.
The command prompt opens and looks similar to Figure 1.
If you regularly use the command prompt, you can add some shortcuts to pin it to the Quick Launch menu or to the Start menu using one of the following methods:
Click Start, type CMD in the Start Search box, right-click CMD, and select either Add to Quick Launch or Pin to Start Menu.
Click Start, All Programs, Accessories, right-click Command Prompt, and select either Add to Quick Launch or Pin to Start Menu.
Note
Quick Launch is available only in Windows Server 2008. It is not available in Windows Server 2008 R2.
2. Launching with Elevated Privileges
Many of the commands entered from the command prompt
require elevated privileges, or administrative permissions. For example,
if you wanted to stop and restart the netlogon service to re-create SRV
records on a DNS server, you can use the following two commands:
sc stop netlogon
sc start netlogon
However, the first command fails with an Access Is
Denied error similar to the following if the command isn’t executed from
an elevated prompt:
c:\ >sc stop netlogon
[SC] OpenService FAILED 5:
Access is denied.
The solution is to launch the command prompt with
administrator permissions by right-clicking the menu item or shortcut
and selecting Run As Administrator.
Note
The command prompt starts in the windows\system32
folder by default when started with administrator permissions and
includes Administrator in the title.
Figure 2 shows how to launch the command prompt with administrator permissions from the Start menu.
Figure 3 shows the command prompt launched with administrator permissions. Notice that the title screen is changed from simply Command Prompt to Administrator: Command Prompt
to let you know you have administrative permissions. Additionally, it
starts in the windows\system32 folder instead of the user’s profile
folder.
Tip
If you log on to the server with the
administrator account, the command prompt is automatically started with
administrator permissions.