These are study notes for those who are currently studying for CompTIA's A+ certification exam.
Each of the following can also be run from CMD, Powershell, Instant Search or Run. On the exam be mindful of the .msc vs. .exe file extensions
Be mindful of Standard Users Command Prompt vs. Administrative Command Prompt
Administrative command prompts can be launched by right-clicking on the Command Prompt icon and choose "Run as Administrator" or use the Instant Search by typing "CMD" and holding CTRL+SHIFT+ENTER
- Runline Commands
- compmgmt.msc - launches Computer Management
- devmgmt.msc - Device Manager
- diskmgmt.msc - Disk Management
- gpedit.msc - Local Group Policy Editor
- services.msc - Services Management Console
- regedit.exe - Windows Registry Edition (use cautiobn)
- perfmon.exe - Performance Monitor
- resmon.exe - Resource Monitor
- cmd.exe - Windows Command Prompt
- powershell.exe - Windows PowerShell
Commands
- cd - change** directory/folder
cd C:\Users\admin\desktop
cd ..
cd\
- dir
dir - shows contents of current directory
dir C:\Users - shows contents of the Users directory
- cls - clear screen
- rm - removes directory(folder)
rm C:\Users\student01\folder1
- md or mkdir - creates directory(folder)
md "C:\Users\Student01\Desktop\Lab Folder"
or
mkdir "C:\Users\Student01\Desktop\Lab Folder"
- del - deleles one or more files
del C:\Users\Student01\testfile01.txt
- copy - most basic copy utility
copy C:\User\Student01\testfile01.txt C:\Users\Student01\Desktop\testfile01.txt
- xcopy - more advance file AND directory copying utility (includes attributes, permission...etc)
xcopy /m /e C:\Users\Student01\Desktop\testfile01.txt
(this example copies files with the archive attribute with /c and copies all subdirectories inluding empty ones\)
- robocopy - this is the most advance copy utility
robocopy source destination [file [file]...] [options]
- attrib - view & modify file and folder attributes
attrib +H C:\Users\Student01\Desktop\testfile01.txt
(this example adds the Hidden attribute to file "testfile01.txt)
- gpupdate - forces an updating of Active Directory Group Policy processing
gpupdate /force
(Note - to update Computer Settings , REQUIRES ADMINISTRATIVE COMMAND PROMPT)
- gpresult - view the results of Active Directory Group Policy proecessing
gpresult /r
(performs and displays the Resultant Set of Policy)
gpresult /h C:\Users\Student01\results.txt
( performs Resultant Set of Policy and display the output in HTML format - REQUIRES ADMINISTRATIVE COMMAND PROMPT)
- tasklist - lists running tasks/processes/applications
tasklist
\(displays ALL running tasks/processes/applications)
tasklist /SVC /v
\(displays all services hosted by running processes with verbose output\ NOTE- this can be used to retrieve the process identifier used in combination with the TASKKILL command)
- taskkill - terminates a specific task/processe/application
taskkill /PID <process identifier for the process>
(terminates the task/process/application with the specified process identifier. NOTE - use in combination with TASKLIST to locate appropriate process identifier or PID)
- shutdown - starts a shutdown or restart process
shutdown /s
(starts basic shutdown procedure)
shutdown /r
(starts a basic restart procedure)
shutdown /f /r /t 01
(FORCES a restart procedure with "/f /r", with a time parameter "/t 01" of one second)
- format - formats a volume with specified file system
format fs=ntfs label=myvolume quick
(formats volume with NTFS, applies "myvolume" label to volume, performs "quick" format)
- sfc - System File Checker, checks the integrity of system files and replaces files that are corrupted or missing(NOTE- requires ADMINISTRATIVE COMMAND PROMPT)
sfc /scannow
(starts System File Checker, scans AND fixes system files)
sfc /verifyonly
(starts System File Checker, scans system files ONLY, does not fix system files)
- chkdsk - Checks and fixes the specified volume for errors
chkdsk /f C:
(locates and fixes errors on volume labeled C:)
chkdsk /r
(locates and fixes errors on volume labeled C:, as well as locating data in bad disk sector and moving that data to good sectors)
Networking Command Prompt Utilities
- ipconfig - view TCP/IP configuration
ipconfig /all
(view detailed properties of network adapter)
ipconfig /release
(releases IP address receive from DHCP server)
ipconfig /renew
(restarts the DORA IP address lease process)
ipconfig /displaydns
(view local DNS resolver cache)
ipconfig /flushdns
(clear local DNS resolver cache)
- ping - test end-to-end communication between to TCP/IP enabled endpoints
ping 10.0.10.120
(ping a host with IP address of 8.8.8.8)
ping dc01.corp.aplusdemo.org
(pings a host via fully-qualified domain name - CAUTION this requires functional DNS name resolution to work)
ping -t -n 10 4.2.2.1
(pings a host with an IP address of 4.2.2.1 persistantly{until stopped}, and sends 10 echo requests)
- tracert - determines the end-to-path a network packets takes from source to destination)
tracert 4.2.2.1
(shows the path from the local host to IP address 4.2.2.1])
tracert -d -4 8.8.8.8
(shows the path from the local host to IP address 8.8.8.8, do not perform name resolution "-d", force IPv4 "-4")
- netstat - view the TCP and UDP connections
netstat -a
(lists all TCP/UDP connections)
netstat -p TCP
(lists all connections via a specific protocol[TCP])
- nslookup - tests DNS name resolution
nslookup 4.2.2.1
(resolves host IP address 4.2.2.1 to the destination fully-qualified domain name)\
nslookup 4.2.2.1 8.8.8.8
(resolves host IP address 4.2.2.1 to it's fully-qualified domain name, sending the request to the DNS server with an IP address of 8.8.8.8)
nslookup [enter]
(this puts nslookup in interactive mode and allows for more advanced DNS name resolution testing)
- net use - mapping a network share to a drive
net use \\filesrv\marketing F:
(maps a share caleed "marketing" on a host named "filesrv" to a local drive letter of "F:")
- net user - used to add, remove, and make changes to the user accounts on a computer
net user Student01
(displays a user "Student01" account properties)
net user Student01 Pa$$w0rd /logonpasswordchg:yes
(changes a user "Student01" password to "Pa$$w0rd" and requires the user to change the password at next logon)