Windows Command Line Interface 1.2 Flashcards
change directory
cd
dir
directory
clear the screen to make it easier to read.
cls
Prints out the contents of the file
type
creates a directory / make directory
md
rmdir
remove directory / deletes directory
xcopy
Copies everything (files and directories)
Robust File Copy for Windows
Newest type of copying utilities
robocopy
DiskPart
Command line version of disk management
listdisk
List all drives within DiskPart
p: \fs:exFat
Format Command
Repairs problems detected with drives
chkdsk
chkdsk p:
Checks the drive to see what problems exist
chkdsk p: /f
Fixes any file errors within the selected drive
chkdsk p: /r
Fixes any file errors and attempts recovery of files
/ ?
Gives a list of everything the command before it can do
shutdown /s
Immediately shuts down
shutdown /h
Hibernation
shutdown /t
Timer before shutdown
System File Checker
A manual interface for verifying system files and restoring them from the cache.
System File Checker commands
sfc /verifyonly
sfc /scannow
Windows Version pop up within the command line interface
winver
Provides information about your own network connection.
ipconfig
Verifies there is a good connectivity between the client and the remote destination.
ping
Shows each and every stop along the way by using multiple pings all the way out and all the way back.
tracert
renews lease on DHCP
ipconfig /renew
ipconfig / release
Releases the ip address
ipconfig /flushdns
flushes the DNS resolver cache
Checks to make sure you can reach your default gateway
ping
What is this command doing?
ping 8.8.8.8
Checking to see if our gateway can reach Google’s DNS servers.
tracert facebook.com
This command maps each and every hop along the way.
Gives a more accurate round-trip time.
pathping
ping hostname
allows you to see the name configured in your computer in intranet.
nslookup
Checks the domain name and returns the ip addresses
nslookup -querty type =mx diontraining.com
checks to see if mail exchanger records can be verified.
Really helpful for malware or threat hunting against bad actors.
Checks for open ports on a given client and looks for ports or connections on listening mode.
netstat
netstat /a
All connections and listening ports
netstat /b
Displays executable involved in creating each connection or listening port.
Useful for identifying malware opening ports.
netstat /o
Displays the owning process ID associated with the port.
netstat /n
Shows ip addresses when looking at ports at a given client.
netstat /an
Combines two commands.
Shows all Ip addresses in all connections and their respective listening ports.
Command that is useful for troubleshooting malware.
netstat /ano
Command for a set of policies all users on a given system or across all systems on a given domain.
gpedit
gpresult /r
Shows which policies are being applied to a specific system.
Works better in a domain environment as opposed to a local environment.
lists all the user accounts for the system you are currently using
net user
What does this command mean net use i: /delete ?
Deletes the network mapped shared drive ( :i )
What does the command “shutdown /s” do on a Windows workstation?
Shutsdown the workstation
The shutdown command allows a user or administrator to shut down or restart local or remote computers, one at a time. Using the /r option will reboot the computer. Using the /s option will shut down the computer. Using the /l option will log off the current user. Using the /h option will enter sleep or hibernation mode.
shutdown /l
Using the / l option will log off the current user.
A Windows laptop is malfunctioning, and you believe that some system files are missing or corrupted. Which of the following commands should you use to verify this and, if needed, repair the files?
chkdsk
sfc
gpupdate
xcopy
sfc
System File Checker command is the utility in Windows that allows users to scan for and restore corrupted Windows system files from the command line.
You are troubleshooting an issue with a Windows desktop and need to display the machine’s active TCP connections. Which of the following commands should you use?
net use
ipconfig
netstat
ping
netstat
Network statistics
netstat