Geeks logo

Top Windows CMD Commands from Basic to Advanced for IT Admins

Discover the top Windows CMD commands for IT admins, from basic to advanced. Learn how CMD enhances system administration, troubleshooting, and automation, and why it's still relevant.

By Patrick RobinsonPublished about a year ago 5 min read
Top Windows CMD Commands from Basic to Advanced for IT Admins
Photo by Tadas Sar on Unsplash

The Windows Command Prompt (CMD) is a powerful command-line interface that allows IT administrators to interact with the Windows operating system through text-based commands. While modern IT environments are becoming increasingly GUI-driven, CMD remains an essential tool for system administrators, providing unparalleled control, efficiency, and automation capabilities.

Whether it’s managing Active Directory, troubleshooting network issues, automating administrative tasks, or monitoring system performance, CMD serves as a reliable tool that enhances productivity and simplifies complex operations.

What is CMD?

CMD, short for Command Prompt, is a built-in Windows utility that enables users to execute system commands via a text-based interface. Unlike graphical user interfaces (GUI), CMD allows IT professionals to run scripts, modify system settings, troubleshoot issues, and perform bulk administrative operations much faster and more efficiently.

CMD has been a core component of Windows for decades, evolving alongside the operating system to support new features, security protocols, and automation tools.

Why is CMD Important for IT Admins?

For IT administrators, CMD provides direct access to Windows system components without the need for third-party tools. Some key advantages include:

1. Efficient System Administration

  • Automate repetitive administrative tasks using batch scripts (.bat files).
  • Perform bulk modifications on user accounts, files, services, and network settings.
  • Quickly navigate directories, copy files, and manipulate system configurations.

2. Powerful Troubleshooting Tool

  • Identify network issues using commands like ping, tracert, and netstat.
  • Diagnose and repair corrupted system files with sfc /scannow.
  • Analyze running processes with tasklist and taskkill.

3. Network Configuration and Security Management

  • Configure IP addresses, reset network stacks, and test connectivity.
  • Manage user permissions and control system access.
  • Encrypt and decrypt sensitive files using cipher.

4. Remote System Management

  • CMD can be used in conjunction with Windows Remote Management (WinRM) and Remote Desktop Protocol (RDP) for controlling systems remotely.

5. Lightweight and Fast Execution

  • CMD does not require a graphical interface, making it lightweight and responsive even on older or low-resource systems.
  • Unlike GUI-based tools, CMD scripts can run in the background without consuming excessive system resources.

PowerShell vs. CMD – Why CMD is Still Relevant

PowerShell: The Advanced Command Line for Windows

Microsoft introduced PowerShell as a more powerful, script-friendly alternative to CMD. Unlike CMD, which primarily executes simple text-based commands, PowerShell is object-oriented, supports complex scripting, and integrates directly with the .NET framework.

Some key advantages of PowerShell over CMD include:

  • More advanced scripting capabilities (supports loops, functions, and objects).
  • Interacts with APIs, system registries, and external databases.
  • Can manage Microsoft services like Azure, Exchange, and Active Directory more efficiently.

Why CMD is Still Relevant in 2025

Despite PowerShell’s superiority in scripting, CMD remains a widely used and essential tool for IT admins. Here’s why:

  • Universality: CMD is available on every Windows machine (including older versions), while PowerShell might not be installed or enabled on certain systems.
  • Simplicity & Speed: CMD executes simple tasks faster than PowerShell. For basic administrative operations, CMD remains lightweight and efficient.
  • Legacy Support: Many legacy applications, scripts, and enterprise systems still rely on CMD-based batch files for automation.
  • Network Administration: Network troubleshooting tools (ping, tracert, ipconfig, netstat, etc.) work seamlessly in CMD without requiring PowerShell.
  • Quick Fixes & Diagnostics: CMD is ideal for quick troubleshooting and repair tasks, such as scanning the system for errors, managing processes, and checking network settings.

The Windows Command Prompt (CMD) is a powerful tool that allows users to perform a variety of tasks efficiently through text-based commands. Whether you're managing files, configuring network settings, or troubleshooting system issues, understanding basic CMD commands can significantly enhance your productivity.

List of CMD commands for IT Admins, applicable as of 2025

1. System & Disk Management Commands

These commands help manage system processes, disk configurations, and troubleshooting.

  • sfc /scannow → Scans and repairs corrupted system files.
  • chkdsk C: /f /r /x → Checks disk for errors, fixes them, and recovers data.
  • diskpart → Opens disk partition management tool.
  • wmic process get name,processid → Lists running processes with their process IDs.
  • powercfg /batteryreport /output "C:\battery_report.html" → Generates a battery report.
  • bcdedit /set {current} safeboot minimal → Enables Safe Mode.
  • lodctr /r → Rebuilds performance counter registry settings.
  • unlodctr "ServiceName" → Removes performance counters for a service.
  • relog input.blg -f csv -o output.csv → Converts a performance counter log file to CSV format.

2. Network & Connectivity Commands

Used for configuring, monitoring, and troubleshooting network settings.

  • netsh interface ip set address "Local Area Connection" static 192.168.1.10 255.255.255.0 192.168.1.1 → Assigns a static IP.
  • netstat -an → Displays all active network connections and listening ports.
  • tracert google.com → Shows the route packets take to reach Google.
  • ping google.com → Checks connectivity to Google’s server.
  • ipconfig /all → Displays detailed network configuration.
  • nltest /dsgetdc:example.com → Finds a domain controller for a specific domain.

3. Group Policy Management Commands

Useful for managing Windows Group Policy settings.

  • gpupdate /force → Forces an immediate Group Policy update.
  • gpupdate /target:computer /force → Updates Group Policy for a specific computer.
  • gpresult /h C:\PolicyReport.html → Generates a Group Policy report in HTML format.

4. Service & Task Automation Commands

Manage Windows services, scheduled tasks, and background processes.

  • sc config "ServiceName" start= auto → Configures a service to start automatically.
  • schtasks /create /tn "BackupTask" /tr "C:\Backup\backup.bat" /sc daily /st 02:00 → Schedules a daily backup task.
  • tasklist /svc → Displays running processes with associated services.
  • taskkill /im notepad.exe /f → Forcefully terminates Notepad.

5. Active Directory Management Commands

Essential for IT admins handling user accounts, groups, and domain controllers.

  • netdom join %computername% /domain:example.com /userd:User /passwordd:* → Joins a computer to a domain.
  • dsquery user -name "John Doe" → Finds a user in Active Directory by name.
  • dsadd user "CN=NewUser,OU=Users,DC=example,DC=com" -pwd P@ssw0rd → Creates a new user account in Active Directory.
  • dsmod user "CN=John Doe,OU=Users,DC=example,DC=com" -disabled no → Enables an Active Directory user account.
  • dsrm "CN=OldUser,OU=Users,DC=example,DC=com" -noprompt → Deletes an Active Directory user account without confirmation.

6. Event & Log Management Commands

Helps admins monitor and manage Windows event logs.

  • wevtutil qe Application /c:10 /f:text → Displays the last 10 entries from the Application event log.
  • openfiles /query /s \\ServerName → Lists open files on a remote server.

7. Backup & Recovery Commands

Used for backup, restore, and data recovery processes.

  • wbadmin start backup -backupTarget:D: -include:C: -allCritical -quiet → Starts a backup of the C: drive.
  • diskshadow → Manages Volume Shadow Copy Service (VSS).
  • cipher /e /s:C:\SensitiveData → Encrypts a folder and its contents on NTFS partitions.

8. File & Automation Commands

Commands for managing files, folders, and automating repetitive tasks.

  • forfiles /p C:\Logs /s /m *.log /d -30 /c "cmd /c del @path" → Deletes .log files older than 30 days.
  • reg add HKLM\Software\NewKey /v NewValue /t REG_SZ /d "Data" → Adds a new registry key.
  • robocopy C:\Source D:\Destination /E /COPYALL /R:0 /DCOPY:T → Robust file copy with advanced options.

Expert Tips for CMD Usage

  • Running CMD as Administrator for full privileges.
  • Using batch scripting to automate tasks.
  • Combining CMD with PowerShell for enhanced system management.
  • Saving command outputs to a file (command > output.txt).
  • Creating aliases for repetitive commands.

Conclusion

While PowerShell is the future of Windows automation, CMD remains an indispensable tool for IT administrators. It provides quick execution, lightweight processing, and compatibility with all Windows versions, making it perfect for system administration, troubleshooting, and automation tasks.

Understanding both CMD and PowerShell allows IT admins to leverage the strengths of both tools, ensuring efficient Windows management in any environment.

list

About the Creator

Patrick Robinson

An IT professional with over a decade of experience, passionate about enterprise mobility & providing top-tier security for corporate devices. My expertise includes deep knowledge of MDM/UEM, security compliance, network management, etc.

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments (1)

Sign in to comment
  • Alex H Mittelman about a year ago

    Cool commands! Terrific!

Find us on social media

Miscellaneous links

  • Explore
  • Contact
  • Privacy Policy
  • Terms of Use
  • Support

© 2026 Creatd, Inc. All Rights Reserved.