Showing posts with label Commands. Show all posts
Showing posts with label Commands. Show all posts

Tuesday, 8 April 2025

Must-Know CMD Commands for System Administrators

📌 User & Group Management

🔹 Check all users: net user

🔹 Check user details: net user username

🔹 Add a new user: net user NewUser Password123 /add

🔹 Add user to local admin group: net localgroup Administrators NewUser /add

🔹 Remove user from a group: net localgroup Administrators NewUser /delete

🔹 Delete a user account: net user NewUser /delete


📌 System Information & Performance

🔹 Check system info: systeminfo

🔹 View running processes: tasklist

🔹 Kill a process by name: taskkill /IM processname.exe /F

🔹 Check disk usage: wmic logicaldisk get name, freespace, size, description

🔹 Check RAM details: wmic MEMORYCHIP get BankLabel, Capacity, Speed

🔹 Check network configuration:ipconfig /all

🔹 Flush DNS cache: ipconfig /flushdns


📌 Network & Remote Management

🔹 Ping a server: ping google.com

🔹 Check open ports: netstat -an | find "LISTEN"

🔹 Test remote connection (RDP): mstsc /v:RemotePCName

🔹 Enable RDP remotely: reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f


📌 File & Disk Management

🔹 List all drives: wmic logicaldisk get name

🔹 Check disk health (SMART): wmic diskdrive get status

🔹 Check file size in a folder: dir /s /a C:\YourFolder

🔹 Find large files (over 1GB): forfiles /S /M *.* /C "cmd /c if @fsize GEQ 1073741824 echo @path @fsize"


📌 Active Directory & Domain Management

🔹 Check domain details: nltest /dsgetdc:yourdomain.com

🔹 List all domain users: net user /domain

🔹 Force Group Policy update: gpupdate /force

🔹 Check AD replication status: repadmin /replsummary


📌 Security & Event Logs

🔹 Check failed login attempts: wevtutil qe Security /c:10 /f:text /q:"*[System[(EventID=4625)]]"

🔹 Enable BitLocker on drive C: manage-bde -on C: -RecoveryPassword

🔹 Check Windows Defender status: sc query windefend



🚀 Why Every System Admin Should Use These Commands?


✅ Saves time – No need to navigate through GUI

✅ Troubleshoot quickly – Identify & fix issues in seconds

✅ More control – Perform advanced tasks efficiently

Step-by-Step Guide to Changing the Microsoft 365 Apps Update Channel | Microsoft Configuration Manager

Managing the update channels for Microsoft 365 Apps is crucial for IT administrators aiming to control the deployment of new features and up...