1. System Information & Management
- hostname – Shows the system’s hostname.
wmic os get Caption, Version, OSArchitecture– Displays OS details.systeminfo– Displays system details like OS version, installed updates, and hardware info.
2. User & Group Management
net user– Lists all local user accounts.net user <username> /add– Creates a new user.net localgroup administrators <username> /add– Adds a user to the Administrators group.net localgroup– Lists local groups.
3. Network Configuration & Troubleshooting
ipconfig /all– Displays detailed network configuration.ipconfig /flushdns– Clears the DNS cache.ping <IP or Hostname>– Checks network connectivity.tracert <IP or Hostname>– Traces the route packets take to a destination.nslookup <domain>– Checks DNS resolution.netstat -ano– Displays active network connections with process IDs.
4. Disk & File System Management
diskpart– Opens the Disk Partition tool.chkdsk /f /r– Checks and repairs disk errors.fsutil fsinfo drives– Lists available drives.dir /s /p– Lists all files and folders in a directory.
5. Task & Service Management
tasklist– Lists running processes.taskkill /PID <PID> /F– Force stops a process using its Process ID.sc query– Lists all running services.sc stop <service-name>– Stops a service.sc start <service-name>– Starts a service.
6. Remote Management
mstsc– Opens the Remote Desktop Connection tool.shutdown /r /t 0– Restarts the server immediately.shutdown /s /t 0– Shuts down the server immediately.sfc /scannow– Scans and repairs system files.
7. Windows Updates
wuauclt /detectnow– Forces Windows to check for updates.sconfig– Opens the Server Configuration tool (useful for Windows Server Core).
8. Active Directory (For Domain Controllers)
dsquery user -name <username>– Searches for a user in Active Directory.dsadd user <DN>– Adds a new user in AD.dsmove <DN> -newparent <OU>– Moves an AD object to a new OU.
These commands help Windows Server Admins efficiently manage and troubleshoot servers.