< All Topics
Print

Commands For Administrators


๐Ÿ“‚ File & Directory Management (20)

  1. dir โ€“ List files
  2. cd path โ€“ Change directory
  3. tree โ€“ Display directory structure
  4. copy file1 file2 โ€“ Copy file
  5. xcopy source destination /E /I โ€“ Copy folder with subfolders
  6. robocopy source destination /MIR โ€“ Mirror directories
  7. move file dest โ€“ Move file
  8. del filename โ€“ Delete file
  9. rmdir /S /Q folder โ€“ Remove folder
  10. attrib +R file โ€“ Add read-only attribute
  11. attrib -R file โ€“ Remove read-only attribute
  12. compact /C file โ€“ Compress file/folder (NTFS)
  13. fsutil file createnew file.txt 1000 โ€“ Create test file
  14. more file.txt โ€“ Display file contents
  15. type file.txt โ€“ Print file contents
  16. find "text" file.txt โ€“ Search text in file
  17. where app.exe โ€“ Find path of program
  18. cls โ€“ Clear screen
  19. explorer . โ€“ Open current folder in Explorer
  20. start filename.txt โ€“ Open file with default app

๐Ÿ‘ฅ User & Group Management (20)

  1. net user โ€“ List users
  2. net user username โ€“ Show details
  3. net user username * โ€“ Reset password
  4. net user username /active:yes โ€“ Enable account
  5. net user username /active:no โ€“ Disable account
  6. net localgroup โ€“ List groups
  7. net localgroup administrators โ€“ Show admins
  8. net localgroup administrators user /add โ€“ Add admin
  9. net localgroup administrators user /delete โ€“ Remove admin
  10. lusrmgr.msc โ€“ Local Users and Groups GUI
  11. whoami โ€“ Current user
  12. whoami /groups โ€“ Show group memberships
  13. whoami /priv โ€“ Show privileges
  14. get-localuser (PS) โ€“ List local users
  15. get-localgroup (PS) โ€“ List groups
  16. get-localgroupmember administrators (PS) โ€“ Show admin members
  17. Add-LocalGroupMember -Group "Administrators" -Member user
  18. Remove-LocalGroupMember -Group "Administrators" -Member user
  19. net accounts โ€“ Show password policy
  20. net accounts /minpwlen:10 โ€“ Set min password length

๐Ÿ’ป System Information (20)

  1. systeminfo โ€“ System details
  2. hostname โ€“ Show computer name
  3. ver โ€“ Windows version
  4. winver โ€“ Build/version info
  5. echo %username% โ€“ Show user
  6. echo %computername% โ€“ Show PC name
  7. set โ€“ Show environment variables
  8. wmic os get caption,version,osarchitecture โ€“ OS info
  9. wmic cpu get name,numberofcores โ€“ CPU info
  10. wmic memorychip get capacity โ€“ RAM info
  11. wmic bios get serialnumber โ€“ BIOS serial
  12. driverquery โ€“ List drivers
  13. tasklist โ€“ List processes
  14. taskkill /PID 1234 /F โ€“ Kill process
  15. get-process (PS) โ€“ Show processes
  16. stop-process -id 1234 -force (PS) โ€“ Kill process
  17. get-service (PS) โ€“ Show services
  18. restart-service spooler โ€“ Restart print service
  19. get-hotfix (PS) โ€“ Installed updates
  20. msinfo32 โ€“ System information tool

๐Ÿ”’ Security & Policy (20)

  1. gpresult /R โ€“ Show applied GPOs
  2. gpupdate /force โ€“ Refresh Group Policy
  3. secedit /analyze โ€“ Analyze security
  4. cipher /E file โ€“ Encrypt file
  5. cipher /D file โ€“ Decrypt file
  6. cipher /W:C:\ โ€“ Wipe free space
  7. auditpol /get /category:* โ€“ Show audit settings
  8. net accounts /maxpwage:30 โ€“ Set max password age
  9. net accounts /lockoutthreshold:3 โ€“ Lockout after 3 tries
  10. net accounts /uniquepw:5 โ€“ Require unique passwords
  11. whoami /priv โ€“ Show privileges
  12. icacls file.txt โ€“ Show permissions
  13. icacls file.txt /grant user:F โ€“ Grant full access
  14. icacls file.txt /remove user โ€“ Remove access
  15. secpol.msc โ€“ Local Security Policy GUI
  16. fido2 (PS) โ€“ Manage security keys (if available)
  17. certmgr.msc โ€“ Certificate Manager
  18. certutil -store my โ€“ List certs
  19. cipher /K โ€“ Generate EFS key
  20. runas /user:domain\user cmd โ€“ Run as another user

๐Ÿ“ก Networking (30)

  1. ipconfig โ€“ IP info
  2. ipconfig /all โ€“ Detailed IP config
  3. ipconfig /release โ€“ Release IP
  4. ipconfig /renew โ€“ Renew IP
  5. ping host โ€“ Test connectivity
  6. tracert host โ€“ Trace route
  7. pathping host โ€“ Trace + packet loss
  8. nslookup domain.com โ€“ DNS lookup
  9. netstat -ano โ€“ Show connections
  10. netstat -rn โ€“ Show routes
  11. arp -a โ€“ ARP table
  12. route print โ€“ Routing table
  13. route add 10.0.0.0 mask 255.255.255.0 192.168.1.1 โ€“ Add route
  14. telnet host port โ€“ Test TCP port
  15. curl -I https://example.com โ€“ HTTP headers
  16. wget https://example.com โ€“ Download file (PS)
  17. Test-NetConnection host -Port 443 (PS) โ€“ Test port
  18. Resolve-DnsName domain.com (PS) โ€“ DNS lookup
  19. netsh interface ip show config โ€“ Show NIC config
  20. netsh advfirewall show allprofiles โ€“ Show firewall profiles
  21. netsh advfirewall reset โ€“ Reset firewall
  22. net use โ€“ Show mapped drives
  23. net use Z: \\server\share โ€“ Map drive
  24. net use Z: /delete โ€“ Unmap drive
  25. mstsc โ€“ Remote Desktop
  26. rasdial โ€“ Manage VPN connections
  27. Get-NetIPAddress (PS) โ€“ Show IP addresses
  28. Get-NetRoute (PS) โ€“ Show routes
  29. Get-NetTCPConnection (PS) โ€“ Active connections
  30. Invoke-WebRequest https://site.com (PS) โ€“ Fetch web data

๐Ÿ›  Disk, Storage, DSM, and Backup (30)

  1. diskpart โ€“ Disk management
  2. list disk โ€“ Show disks
  3. list volume โ€“ Show volumes
  4. select disk 0 โ€“ Select disk
  5. clean โ€“ Wipe disk
  6. create partition primary โ€“ New partition
  7. format fs=ntfs quick โ€“ Format partition
  8. assign letter=E โ€“ Assign drive letter
  9. mountvol โ€“ Show mounted volumes
  10. chkdsk C: /F /R โ€“ Scan and repair disk
  11. defrag C: โ€“ Defragment disk
  12. vssadmin list shadows โ€“ Show shadow copies
  13. vssadmin delete shadows /all โ€“ Delete shadow copies
  14. fsutil fsinfo drives โ€“ List drives
  15. fsutil dirty query C: โ€“ Check dirty bit
  16. fsutil behavior query disabledeletenotify โ€“ TRIM status
  17. wbadmin start backup -backupTarget:D: -include:C: โ€“ Start backup
  18. wbadmin get versions โ€“ List backups
  19. wbadmin start recovery โ€“ Start recovery
  20. DISM /Online /Cleanup-Image /CheckHealth โ€“ Check image health
  21. DISM /Online /Cleanup-Image /ScanHealth โ€“ Scan image
  22. DISM /Online /Cleanup-Image /RestoreHealth โ€“ Repair image
  23. DISM /Online /Cleanup-Image /StartComponentCleanup โ€“ Clean components
  24. sfc /scannow โ€“ Repair system files
  25. sfc /verifyonly โ€“ Verify system files
  26. CHKNTFS C: โ€“ Check autochk status
  27. CHKNTFS /X C: โ€“ Exclude drive from autochk
  28. Get-Volume (PS) โ€“ List volumes
  29. Get-Partition (PS) โ€“ List partitions
  30. Resize-Partition (PS) โ€“ Resize partition

โšก Performance & Monitoring (30)

  1. taskmgr โ€“ Task Manager
  2. perfmon โ€“ Performance Monitor
  3. resmon โ€“ Resource Monitor
  4. eventvwr โ€“ Event Viewer
  5. logman create counter PerfLog -c "\Processor(_Total)\% Processor Time" -f csv -o C:\Perf.csv โ€“ Perf log
  6. wevtutil qe System /c:10 /f:text โ€“ Show last 10 system logs
  7. Get-EventLog -LogName system -Newest 10 (PS) โ€“ Event logs
  8. Get-WinEvent -LogName Application -MaxEvents 20 (PS) โ€“ New event log tool
  9. Get-Counter "\Processor(_Total)\% Processor Time" (PS) โ€“ CPU usage
  10. Get-Counter "\Memory\Available MBytes" (PS) โ€“ Memory usage
  11. Get-Counter "\LogicalDisk(C:)\% Free Space" (PS) โ€“ Disk usage
  12. Get-Process | Sort-Object CPU -Descending | Select -First 5 โ€“ Top processes
  13. Get-Service | Where-Object {$_.Status -eq "Running"} โ€“ Running services
  14. query user โ€“ Show logged-in users
  15. qwinsta โ€“ Remote desktop sessions
  16. rwinsta <ID> โ€“ Kill RDP session
  17. tasklist /V โ€“ Verbose processes
  18. typeperf "\Processor(_Total)\% Processor Time" โ€“ Live CPU stats
  19. typeperf "\Memory\Available MBytes" โ€“ Memory stats
  20. Get-WmiObject win32_operatingsystem โ€“ System stats
  21. Get-WmiObject win32_logicaldisk โ€“ Disk stats
  22. Get-WmiObject win32_processor โ€“ CPU info
  23. powercfg /batteryreport โ€“ Battery health
  24. powercfg /energy โ€“ Energy diagnostics
  25. powercfg /sleepstudy โ€“ Sleep diagnostics
  26. psinfo (Sysinternals) โ€“ Quick system summary
  27. pslist (Sysinternals) โ€“ Process list
  28. psexec โ€“ Remote execution
  29. psshutdown โ€“ Remote shutdown
  30. bginfo โ€“ Display system info on desktop

๐Ÿ”ง Troubleshooting & Admin Tools (30)

  1. shutdown /i โ€“ Remote shutdown GUI
  2. shutdown /r /t 0 โ€“ Restart now
  3. shutdown /s /f /t 0 โ€“ Shutdown now
  4. taskkill /IM notepad.exe /F โ€“ Kill app by name
  5. sc query โ€“ Query services
  6. sc stop spooler โ€“ Stop service
  7. sc start spooler โ€“ Start service
  8. net start โ€“ Show running services
  9. net stop service โ€“ Stop service
  10. net start service โ€“ Start service
  11. services.msc โ€“ Services GUI
  12. compmgmt.msc โ€“ Computer Management
  13. devmgmt.msc โ€“ Device Manager
  14. diskmgmt.msc โ€“ Disk Management
  15. dcomcnfg โ€“ Component Services
  16. msconfig โ€“ System Configuration
  17. regedit โ€“ Registry Editor
  18. reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run โ€“ Startup apps
  19. reg add HKCU\Software\Test /v MyValue /t REG_SZ /d Data โ€“ Add reg value
  20. reg delete HKCU\Software\Test /v MyValue /f โ€“ Delete reg value
  21. cleanmgr โ€“ Disk Cleanup
  22. dxdiag โ€“ DirectX diagnostic
  23. mrt โ€“ Malicious Software Removal Tool
  24. taskschd.msc โ€“ Task Scheduler
  25. schtasks /query โ€“ Show scheduled tasks
  26. schtasks /create /sc daily /tn MyTask /tr "notepad.exe" โ€“ Create task
  27. sysdm.cpl โ€“ System Properties
  28. control โ€“ Control Panel
  29. appwiz.cpl โ€“ Programs & Features
  30. optionalfeatures โ€“ Windows Features