Basic Navigation:
BAT (Batchfile)
cd [directory_path] # Change the current directory.
dir [directory_path] # List directory contents.
mkdir [directory_name] # Create a new directory.
File Operations:
BAT (Batchfile)
copy [source] [destination] # Copy files from source to destination.
move [source] [destination] # Move or rename files and directories.
del [file_name] # Delete a file.
System Information:
BAT (Batchfile)
systeminfo # Display detailed system information.
hostname # Display the hostname of the computer.
Network Commands:
BAT (Batchfile)
ipconfig # Display IP configuration information.
ping [host] # Check network connectivity to a host.
User Account Management:
BAT (Batchfile)
net user [username] [password] /add # Add a new user.
net localgroup [group_name] [username] /add # Add a user to a local group.
Task Management:
BAT (Batchfile)
tasklist # List running processes.
taskkill /F /IM [process_name] # Terminate a process.
Miscellaneous:
BAT (Batchfile)
tasklist # List running processes.
taskkill /F /IM [process_name] # Terminate a process.
Advanced CMD Commands:
BAT (Batchfile)
sfc /scannow # Scan and repair system files.
chkdsk [drive_letter]: /f # Check and fix disk errors.
robocopy [source] [destination] /options # Robust file copy.
wmic [option] [command] # Windows Management Instrumentation.
powercfg /option # Power configuration.
regedit # Registry Editor.
netstat -an # Display network statistics.
gpupdate /force # Force an immediate update of Group Policy.
shutdown /s /t [time_in_seconds] # Shutdown the system.
Keyboard Shortcuts:
BAT (Batchfile)
Ctrl + C # Copy selected text.
Ctrl + V # Paste copied text.
Ctrl + A # Select all text.
Ctrl + Arrow Keys # Navigate word by word.
F7 # Display command history.
Additional Tips:
BAT (Batchfile)
> # Redirect output to a file.
Use quotes for paths with spaces.
Run CMD as an administrator for certain commands.
command_name /? # Get help and additional options.
Troubleshooting and Maintenance:
BAT (Batchfile)
dism /online /cleanup-image /restorehealth # Repair the Windows image.
netsh [command] # Network Shell command.
taskmgr # Open Task Manager.
perfmon # Launch Performance Monitor.
gpedit.msc # Open Group Policy Editor.
chkntfs [drive_letter]: # Check the NTFS file system on the specified drive.
Batch Scripting:
BAT (Batchfile)
FOR /F "options" %variable IN ('command') DO command # Loop command.
IF [condition] command # Conditional statement.
GOTO label # Jump to a specific label.
Remote Desktop Connection:
BAT (Batchfile)
mstsc # Open Remote Desktop Connection.
shutdown /m \\computername /s /t [time_in_seconds] # Remote shutdown.
System Backup and Restore:
BAT (Batchfile)
wbadmin start backup -backupTarget:[target] -include:[items_to_include] # Start a backup.
rstrui.exe # Open System Restore.
Table Of Commands
Category | Command | Description |
---|---|---|
Basic Navigation | cd [directory_path] | Change the current directory. |
dir [directory_path] | List directory contents. | |
mkdir [directory_name] | Create a new directory. | |
File Operations | copy [source] [destination] | Copy files from source to destination. |
move [source] [destination] | Move or rename files and directories. | |
del [file_name] | Delete a file. | |
System Information | systeminfo | Display detailed system information. |
hostname | Display the hostname of the computer. | |
Network Commands | ipconfig | Display IP configuration information. |
ping [host] | Check network connectivity to a host. | |
User Account Management | net user [username] [password] /add | Add a new user. |
net localgroup [group_name] [username] /add | Add a user to a local group. | |
Task Management | tasklist | List running processes. |
taskkill /F /IM [process_name] | Terminate a process. | |
Miscellaneous | echo [text] | Display text on the screen. |
cls | Clear the screen. | |
Advanced CMD Commands | sfc /scannow | Scan and repair system files. |
chkdsk [drive_letter]: /f | Check and fix disk errors. | |
robocopy [source] [destination] /options | Robust file copy. | |
wmic [option] [command] | Windows Management Instrumentation. | |
powercfg /option | Power configuration. | |
regedit | Registry Editor. | |
netstat -an | Display network statistics. | |
gpupdate /force | Force an immediate update of Group Policy. | |
shutdown /s /t [time_in_seconds] | Shutdown the system. | |
Keyboard Shortcuts | Ctrl + C | Copy selected text. |
Ctrl + V | Paste copied text. | |
Ctrl + A | Select all text. | |
Ctrl + Arrow Keys | Navigate word by word. | |
F7 | Display command history. | |
Additional Tips | > | Redirect output to a file. |
Use quotes for paths with spaces. | ||
Run CMD as an administrator for certain commands. | ||
command_name /? | Get help and additional options. | |
Troubleshooting and Maintenance | dism /online /cleanup-image /restorehealth | Repair the Windows image. |
netsh [command] | Network Shell command. | |
taskmgr | Open Task Manager. | |
perfmon | Launch Performance Monitor. | |
gpedit.msc | Open Group Policy Editor. | |
chkntfs [drive_letter]: | Check the NTFS file system on the specified drive. | |
Batch Scripting | FOR /F "options" %variable IN ('command') DO command | Loop command. |
IF [condition] command | Conditional statement. | |
GOTO label | Jump to a specific label. | |
Remote Desktop Connection | mstsc | Open Remote Desktop Connection. |
shutdown /m \\computername /s /t [time_in_seconds] | Remote shutdown. | |
System Backup and Restore | wbadmin start backup -backupTarget:[target] -include:[items_to_include] | Start a backup. |
rstrui.exe | Open System Restore. |