Windows Commands Flashcards
Change directory
cd
Delete directory
rmdir
List All files and subdirectories
dir
Create new directory
md / mkdir
Display all network configuration values, including hostname, IP address, default gateway, subnet mask, network features
ipconfig
ipconfig /all (all adapters)
Display name of host system
hostname
Copy files and subfolders with full control over moving data, commonly used for managing data between multiple PCs
robocopy
robocopy /S (only subdirectories with contents)
robocopy /E (all subdirectories)
other flags - granular control over data transfer when copying over network
Display both incoming and outgoing connections to your PC along with the protocol type, plus parameters to see routing table, number of bytes and packets sent/received, process ID (PID), program name that established the connection
netstat
netstat -a (active connections)
netstat -b (display programs attached to each connection) <== admin
netstat -n (show IP addresses only)
Scan the hard drive for logical or physical errors, plus parameters to find and fix file system errors and bad sectors automatically
chkdsk (cross ref dir to filesystem only)
chkdsk /f (fix structural mismatches btwn dir / filesystem)
chkdsk /r (/f + recovers physical data on corrupted disk sectors that can’t be repaired)
Scan all system files and look for errors, then automatically replace any with a new file from cache
sfc
sfc /scannow
Delete and Format all data on a volume, and parameters to configure file system type, change volume label, change allocation unit size, create compressed volume
format [C:]
Check DNS records and troubleshoot DNS.
nslookup [url]
Apply group policies on a computer in a windows domain, possibly to refresh GPOs and avoid reboot
gpupdate /[target]:[user]
gpupdate […] /force
Report what group policies and settings are applied to a user or computer, especially given parameters to specify which hostname or scope
gpresult
Manage local disks, partitions, and volumes, including delete, create, format, extend and shrink volumes
diskpart (enters program)
format (format volume or partition)
list [disk/partition/volume/vdisk]
filesystems (display supported filesystems and those in use on volume)
extend
shrink
setid (change partition type)
rescan (look for all on computer)