0% found this document useful (0 votes)
4 views19 pages

Computer System Servicing

The document provides a comprehensive guide on using the Command Prompt for various tasks, including navigating directories, managing files, checking system information, performing network operations, and managing tasks. It includes exercises for creating directories, renaming files, checking system information, and using commands for virus scanning and task scheduling. Additionally, there are bonus challenges for identifying suspicious processes and cleaning temporary files.

Uploaded by

patnaan037
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views19 pages

Computer System Servicing

The document provides a comprehensive guide on using the Command Prompt for various tasks, including navigating directories, managing files, checking system information, performing network operations, and managing tasks. It includes exercises for creating directories, renaming files, checking system information, and using commands for virus scanning and task scheduling. Additionally, there are bonus challenges for identifying suspicious processes and cleaning temporary files.

Uploaded by

patnaan037
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

PATNAAN JUDITH G.

CMD EXERCISES

CSS_B

Exercise 1: Navigating the Command Prompt

1. Open Command Prompt: o Press Windows + R, type cmd, and press Enter.

2. Check Your Current Directory:

o Type the command cd and press Enter. This will show your current
directory.

Question: What is your current directory? (e.g., C:\Users\YourName)

*C:\Users\tommy

3. Change to a Specific Directory:

o Use the cd command to navigate to your Documents folder.

o Command: cd C:\Users\YourUsername\Documents
Question: What happens when you run this command?

*current directory will change into the specified directory

Exercise 2: File and Directory Management

1. List Files in a Directory:

o Type dir and press Enter to see all files and directories in the current
directory.

Question: What types of files and folders are listed?

*document folder and its files.

2. Create a New Directory:

o Use the mkdir command to create a new folder called PracticeFolder


inside the Documents folder.
o Command: mkdir PracticeFolder

Question: Was a new folder created? Check your directory by typing dir.

*yes

3. Navigate to the New Folder:

o Change to the new folder using cd:

o Command: cd PracticeFolder

Question: Did the directory change to


C:\Users\YourUsername\Documents\PracticeFolder?

*yes

4. Create a New Text File:

o Create a new text file inside the PracticeFolder by typing the command:

o Command: echo This is my first file > file1.txt

Question: What does the echo command do? Check your folder using dir.

*echo command displays a message or turns command echoing on or off.

5. Display the Contents of the File:


o Use the type command to display the contents of the file.

o Command: type file1.txt

Question: What do you see as the output of this command?

*this is my first file.txt


Exercise 3: File Operations

1. Rename a File:

o Rename the file1.txt to file_renamed.txt using the ren command.

o Command: ren file1.txt file_renamed.txt

Question: Verify that the file was renamed by typing dir again.

2. Copy the File to Another Location:

o Use the copy command to copy the renamed file to the C:\Users\
YourUsername\Desktop.

o Command: copy file_renamed.txt C:\Users\YourUsername\Desktop

Question: Was the file copied successfully? Check your Desktop.

3. Delete the File:

o Delete the copied file on the Desktop using the del command.

o Command: del C:\Users\YourUsername\Desktop\file_renamed.txt

Question: Was the file deleted? Check the Desktop.

*yes

4. Remove the Directory:

o Remove the PracticeFolder directory using the rmdir command.

o Command: rmdir C:\Users\YourUsername\Documents\PracticeFolder


Question: Was the directory removed? Check the Documents folder.

Exercise 4: System Information

1. Display System Information:

o Use the systeminfo command to display information about your


computer’s operating system and hardware.

o Command: systeminfo

Question: What important information does this command show?

*it shows all information about your system.

2. Check the Current Date and Time:

o Use the date command to display or set the date.


o Command: date

Question: What date does it display? Can you change it?

*displays current date. Yes.

3. Check Disk Space:

o Use the dir command to display the available disk space on the current
directory.

o Command: dir

Question: Look for the "bytes free" line and note how much space is
available.

Exercise 5: Network Operations

1. Ping a Website:

o Use the ping command to check the connectivity to a website (e.g.,


google.com).

o Command: ping google.com

Question: What does the ping command show?

*it shows the reply from a IP address which means that the connection was
successful.

2. Display IP Configuration:

o Use the ipconfig command to display your network configuration.


o Command: ipconfig

Question: What information does this command display? Look for your
IP address.

*it shows network settings> IP address information of device, Ethernet,


LAN.

Exercise 6: Task Management

1. List Running Processes:

o Use the tasklist command to display all running processes


on your computer.

Command: tasklist

Question: What processes are currently running on your system?


*SERVICES.EXE, SCVHOST.EXE and others.

2. End a Running Process:

o Use the taskkill command to terminate a specific running process (e.g.,


notepad.exe).

o Command: taskkill /im notepad.exe

Question: Did the process end? Try opening Notepad again.

*yes

Exercise 7: Shutting Down or Restarting

1. Shut Down Your Computer:

o Use the shutdown command to turn off the computer.

o Command: shutdown /s /f /t 30
Question: What does /s, /f, and /t mean in the command?

*s=shutdown, f=force, t=timeout

*it means
that the
device will
shutdown
and at the
same time
force the
current
running
applications
or software to terminate.

2. Restart Your Computer:

o Use the shutdown command to restart the computer.

o Command: shutdown /r /f /t 10
Question: What happens after running this command?

Will restart your computer


Bonus Challenge 1: Combining Commands

1. Create a Folder, add a File, and List the Contents:

o Use the following combination of commands:

o Command: mkdir NewFolder && echo Hello World > NewFolder\file.txt


&& dir NewFolder

Question: What happens after running this combined command?

*creates new folder, file text that contains hello world.


Bonus Challenge 2: Check for Suspicious Processes

Malicious software often runs in the background, and you can use CMD to identify
these processes.

1. Open Command Prompt as Administrator:

o Press Windows + X and select Command Prompt (Admin) or Windows


PowerShell (Admin).

o Alternatively, search for cmd in the Start menu, right-click it, and select
Run as administrator.

2. List Running Processes:

o Type the following command to display a list of all running processes


on your computer.

o Command: tasklist
Question: What processes are running? Look for any unfamiliar
processes that might be suspicious.

 There are no processes running suspiciously. I’ve searched them in


the windows search bar.

3. Search for Specific Suspicious Processes:

o If you know the name of a potentially malicious process, you can


search for it using the findstr command.

o Command: tasklist | findstr suspiciousprocess.exe


Question: Is the suspicious process running?

*did’nt find any suspicious process running.

4. Terminate Malicious Process:

o If you identify a suspicious or malicious process, you can terminate it


using the taskkill command.

o Command: taskkill /f /im suspiciousprocess.exe


Question: What happens when you terminate a process? Are there any
system impacts?

Command will automatically shutdown the process being terminated.

Bonus Challenge 3: Scan for Malicious Files Using


System File Checker (SFC)

The System File Checker (SFC) tool can be used to scan and repair corrupted or
malicious system files.

1. Run SFC Scan:


o In the Command Prompt, type the following command and press Enter:

o Command: sfc /scannow

Question: What happens during the scan? How long does it take to
complete?

*it takes a lot of patience, about 35 minutes.

2. Check the Results:

o Once the scan completes, SFC will provide a summary of what was
found. If any malicious or corrupted files were found, the system will
attempt to repair them.

Question: Were any integrity violations found? What was the action
taken?

*YES

Bonus Challenge 4: Use Windows Defender (CMD)


for Virus Scanning

You can use Windows Defender through Command Prompt to perform a virus scan.

1. Run a Quick Scan Using Windows Defender:

o Type the following command to run a quick scan for viruses and
malware:

o Command: MpCmdRun.exe -Scan -ScanType 1

Question: How long does it take for the scan to complete? What files
are scanned during the process?

*1 hour

2. Run a Full Scan Using Windows Defender:

o A full scan is more thorough and may take longer to complete. Type
the following command to perform a full system scan:

o Command: MpCmdRun.exe -Scan -ScanType 2


Question: Did the full scan detect any threats? If yes, what actions did
Windows Defender take?

*it didn’t detect any threats.

3. Review Scan Results:

o After the scan, check the results by reviewing the log file or reviewing
the Defender interface. You can also check the status of the last scan
using:

o Command: MpCmdRun.exe -GetLastScanResult


Question: What were the results of the last scan?

*no result displayed the time ran the command.

Bonus Challenge 5: Delete or Quarantine Malicious


Files

If malicious files or programs are found, you can attempt to delete or quarantine
them using CMD.

1. Find Potentially Malicious Files:

o Navigate to the folder where you suspect malicious files might be


located.
For example, if you suspect a file is in
C:\Users\YourUsername\Downloads, type:

o Command: cd C:\Users\YourUsername\Downloads
Question: Are there any files that look suspicious?

NONE

2. Delete Suspicious Files:

o If you know the malicious file name, you can use the del command to
remove it. Be very careful when deleting files.

o Command: del maliciousfile.exe

Question: What happens when you delete the file? Is it successfully


removed from the folder?

NONE

3. Delete Multiple Suspicious Files:

o You can use wildcards (*) to delete multiple files at once. For example,
to delete all .exe files:

o Command: del *.exe

Question: Was the deletion successful? Check the folder again to


confirm.

NONE

Bonus Challenge 6: Use Task Scheduler to Automate


Virus Scans

You can schedule regular virus scans using Task Scheduler and CMD commands.

1. Create a Task to Run a Scan:

o Type the following command to schedule a daily scan with Windows


Defender at a specific time (e.g., 3:00 AM).

o Command:
Question: What happens when you schedule the scan? Can you verify that the task
is created in Task Scheduler?

*The scan will automatically do its task at the time it was scheduled.

2. List Scheduled Tasks:

• You can check the list of scheduled tasks using the following command:

• Command: schtasks /query

Question: Is your scheduled virus scan listed? What time is it set to run?

YES

3. Remove the Scheduled Task:

• If you no longer want to run the task, you can delete it using the schtasks
command.

• Command: schtasks /delete /tn "Defender Scan"

Question: Was the task successfully removed?

YES, it was removed in the task scheduled list and, in the query
Bonus Challenge 7: Clear Temporary Files and Cache

Malicious software often hides in temporary files or caches. You can use CMD to
clear these files.

1. Delete Temporary Files:

o Use the following command to delete temporary files stored in the


Temp folder:

o Command: del /q/f/s %TEMP%\*


Question: Were any files deleted? What do these files typically contain?

A LOT OF FILE WAS DELETED, THIS CONTAINS LEFTOVER FILES DURING


INSTALLATION, SESSION DATA
2. Clear Windows Event Logs:

o Sometimes, malware hides in Windows event logs. You can clear event
logs using the following command:

o Command: wevtutil cl Application

Question: Did you encounter any issues clearing event logs?

NONE

You might also like