Windows Commands Flashcards
/?
View help info about a command
Ex:
ping /?
ping -l
Specifies a packet size
ping -a
Reverse PTR record lookup - provides IP address of a domain name
PTR record lookup
DNS pointer record provides domain name of an IP address
ping -t
Continuous ping
ipconfig
Display a a computer’s TCP/IP configuration
ipconfig /all
Display info for all network cards
nslookup
Check DNS records and troubleshoot DNS
tracert
Track the pathway a packet takes from source IP to the destination address
Display each hop (router) that the packet passes through
Ex:
tracert google.com
shutdown
Shuts down computer
shutdown /r /m \pc2
Restart computer pc2
shutdown /s /m \pc2
Shut down remote computer
shutdown /d
Previous shutdown/restart logs
gpupdate
Apply group policies on a computer in a windows domain
netstat
Display network connections
netstat -a
Display all active and listening ports
dcdiag
Analyze the state of your domain controllers
Domain controllers
A server that provides critical services like authentication and authorization for an Active Directory domain
net stop and net start
Start and stop windows services
systeminfo
Displays configuration details on a computer
systeminfo /s
Remote computers
getmac
Get MAC address from all network cards on a system
Use /s for remote computers
gpresult
Reports on what group policies and settings are applied to a user or computer
whoami
Display current user
set
Displays environment variable information
cd
Change directory
mkdir
Make directory
sfc
System file checker
sfc /scannow
Scan all protected operating system files and repair if needed
sfc /verifyonly
Runs test without repairing
chkdsk
Scans the file system on the disk and checks the integrity of the files and metadata
chkdsk /f
Fox any errors found on the disk
route print
View local computers routing table
Useful when the computer has multiple network interface cards and you need to determine the route network traffic is taking
powercfg /list
List all power schemes
tasklist
Display the running processes
taskkill
Terminate a process by the PID
Force with /f
Ex:
taskkill /pid 1808 /f
format
Format a partition on a hard drive or flash drive
Wipes all data from the partition
Example formatting the E drive to the NTFS file system
format e: /fs:NTFS
cls
Clear screen
diskpart
Manage disks, partitions, volumes on your local computer
robocopy
Robust copy, copy files and directories from one location to another
xcopy
Copy all files and folders to a new location
Ex:
xcopy c:\myfolder e:myholder
del
Delete files and folders
del c:\it*.exe
Delete all exe files
del c:\it*.*
Delete files and sub folders
schtasks
Lets you add, remove, change and view scheduled tasks
net user
Displays user account information on a local computer
net user /domain
Displays user account information on a domain
arp
Displays and modified the address resolution protocol cache on the local computer
hostname
Displays the host name of the computer
cipher
Overwriting deleted data in windows
Makes it unrecoverable
Ex:
cipher /w:c:\it\private
fc
File compare
Compares two files and displays the difference
psexec
Allows you to execute commands on remote computers
rspop
Creates a report of the policies applied to a computer and user
mmc
Opens Microsoft management console
dir
Lists all files and directories in a specific directory
dir /p
Pause the directory listing
runas
Run a tool or program as a different user
rmdir
Remove empty directories
rmdir c:\it\private /s
Delete a directory and the files inside it
ver
Displays windows version
findstr
Searches for patterns of text in files