Sub-Objective 1.4

Sub-Objective 1.4 – Given a scenario, use appropriate Microsoft command line tools.

Welcome to ExamNotes by CertBlaster! In this section, we will be looking at Microsoft command line tools. Knowledge of these commands and how they are used will save you time trying to hunt down this info. These tools are always in the “path” and are easily accessible from the command prompt. These commands highlight the need for in-depth knowledge of the filesystem structure. Also notable are commands that require elevation of privileges, better known as “Run as Administrator.”

Button to click for a walkthrough of a performance based question

We are presenting the commands in the same order as seen in the CompTIA exam objectives for A+ 220-1002. except for the section on standard vs. administrative privileges. Remember that for any command, typing the command and appending /?  will display the help text for that command including a list of the available parameters and their usage.

Commands available with standard privileges vs. administrative privileges

If you are operating as a standard user, you may have problems executing some commands that Microsoft deems too risky for the average user. To bypass this issue, you can right-click on any Command Prompt shortcut and choose Run as administrator. You can tell you are running as administrator when your Prompts title bar shows Administrator: Command Prompt and you are working in the C:WindowsSystem32> directory.

Navigation

DIR

This command displays file and directory information from a command prompt. This command is available from the Recovery Console.

CD

This command displays the name of the current directory if used without parameters. This command can also be used to move to another directory (as in Change Directory) if a path is supplied. For example cd C:Temp will move the prompt into the Temp directory on the C: drive if it exists. CD will take you to the root of your current drive. CD..  will take you to the parent directory of the current directory. The /D parameter is used when moving to a different disk or drive. The command is not case sensitiveThe CHDIR command is used in the same way as CD but is not listed in your objectives. This command is available from the Recovery Console.

..

Represents the parent directory of the one you are in. For example, if you were at C:WorkComplete and entered CD.. you would move up into the Work directory.

IPCONFIG

Ipconfig displays the host’s IP configuration.

PING

This command line tool enables you to determine if you have a connection to another device on the network.

TRACERT

Tracert is used at the command line to display the path your data takes to a particular host on the network or internet. Traceroute is the Linux version of this command.
NETSTAT is used at the command line for displaying the network statistics of your TCP traffic.

NETSTAT

When used without parameters, NETSTAT displays the TCP connections and state for both IPv4 and IPv6 connections. Now deprecated in Linux, NETSTAT is still used on Windows platforms.

Netstat Command Output

NSLOOKUP

NSLOOKUP is a specialized command line Query tool. It is used to obtain any DNS information using command modifiers and switches. NSLOOKUP can return a great deal of DNS data.

SHUTDOWN

Shutdown allows you to restart or shutdown a remote or local computer. In the default behavior, SHUTDOWN logs off the current user and is equivalent to the –l parameter. The –m parameter allows you to specify the computer you want to shut down and –s shuts down the local computer.

DISM

The Deployment Image Servicing and Management (DISM) tool is used to mount and service Windows images before deployment.

SFC

SFC is the System File Checker. It is executed after a reboot and scans all protected system files, verifying their versions and integrity.

CHKDSK

There are two operational modes of chkdsk, one is available in the Recovery Console and the other can be scheduled from the drive’s properties window or the command line. This command checks the hard drive for errors and can attempt to recover data from bad sectors. The drive has to be locked during this process, requiring a reboot.

DISKPART

This is the command line replacement for the venerable fdisk command. Using diskpart, you can add or delete partitions on system disks. This command is available from the Recovery Console.

TASKKILL

The taskkill command replaces the kill command and is capable of terminating processes from the command line using either the process name or PID.

GPUPDATE

Refreshes the Local and Active Directory Group policy and security settings.

GPRESULT

Displays the Resultant Set of Policy (RSoP) for a remote computer and user.

Click here for the A+ Practice Test Bundle for A+ Exams 220-1001 & 220-1002

FORMAT

The Format command is used to create a new root directory and file system on a disk. When using Standard formatting (format C: /p), all data is overwritten with zeroes. Using the quick option (format C: /q) deletes the master file table and the root directory from a previously formatted disk. The quick option does not zero out the sectors, meaning that the data is still present and recoverable with specialized software. This command is available from the Recovery Console.

COPY

There are several ways to move data. Each way is best described using the help screen for the command. For the copy command, you need to specify one or more source files, the destination path, and filename(s). Use caution when copying multiple files. If the destination is not properly defined, copy will combine all source files into a single file. Copy will not copy files that are zero bytes long. Use Xcopy (discussed next) for copying zero byte files. This command is available from the Recovery Console.

XCOPY

XCOPY copies files and directories including directory structure. Xcopy can copy zero byte files. There are multiple parameters, practically /a to /z. Fortunately, you don’t have to worry about them. Just concentrate on the source and destination.

ROBOCOPY

ROBOCOPY (as in Robust File Copy, with an extra “o’ to be cool…) is a powerful file copy utility that was introduced as a standard feature in Windows Vista. It is capable of copying, moving, or deleting files and directories. It is also capable of creating mirror images of entire directory trees as well as allowing the administrator to copy data that he or she does not have permission to view. One drawback that prevents use on live machines is the fact that Robocopy cannot copy an open file. As our systems become more complex, they can open and close files that support processes, so you can’t be 100% sure of a complete copy. Shadow copies are best suited to get a complete copy.

NET use/user

This best resembles a Swiss army knife of command line networking utilities. When used at the command line, there are a variety of switches available, enabling the user to display network connections and even map networked resources as drives on the local machine. The net use command can connect, remove, and configure network connections. Without arguments, net use displays the current connections in use. Net user can be used to add, remove, and make changes to user accounts.

[command name] /?

Use command /? in order to see the help documentation for a particular file.

Click here for the A+ Practice Test Bundle for A+ Exams 220-1001 & 220-1002

These are all the commands in A+ 220-1002 Objective 1.4 Given a scenario, use appropriate Microsoft command line tools. The best way to really learn these commands is to run them on a PC. Having said that, look out for commands such as FORMAT as they can be pretty terminal on your system and/or data! That’s all for objective 1.4! Good luck on the exam!

By continuing to browse this site, you accept the use of cookies and similar technologies that will allow the use of your data by CertBlaster in order to produce audience statistics- see our privacy policy.