KEMBAR78
Top 200+ Windows Server Commands (CMD & PowerShell) | PDF | Group Policy | Domain Name System
0% found this document useful (0 votes)
42 views4 pages

Top 200+ Windows Server Commands (CMD & PowerShell)

This document provides a comprehensive list of over 200 CMD and PowerShell commands for Windows Server, categorized into various sections including System Info, User Management, Network Configuration, and more. Each section outlines specific commands along with their functions, such as managing users, configuring network settings, controlling services, and monitoring system performance. The commands serve as essential tools for system administrators to efficiently manage and troubleshoot Windows Server environments.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views4 pages

Top 200+ Windows Server Commands (CMD & PowerShell)

This document provides a comprehensive list of over 200 CMD and PowerShell commands for Windows Server, categorized into various sections including System Info, User Management, Network Configuration, and more. Each section outlines specific commands along with their functions, such as managing users, configuring network settings, controlling services, and monitoring system performance. The commands serve as essential tools for system administrators to efficiently manage and troubleshoot Windows Server environments.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Top 200+ Windows Server CMD & PowerShell Commands

System Info & Server Basics

systeminfo -- System full details


hostname -- Shows server name
ver -- Windows version
set -- List environment variables
echo %username% -- Shows current user
net config workstation -- Workstation info
date /t & time /t -- Show current date/time
whoami -- Show current user with domain
wmic os get caption -- OS name
Get-ComputerInfo -- PowerShell: full system info

User Management

net user -- List all users


net user USERNAME /add -- Create user
net user USERNAME /del -- Delete user
net localgroup -- List local groups
net localgroup GROUP USER /add -- Add user to group
net accounts -- View password policy
lusrmgr.msc -- GUI for user/group mgmt
Get-LocalUser -- PowerShell: list local users
Get-LocalGroupMember -Group "Administrators" -- Show admin users
Set-LocalUser -Name USER -PasswordNeverExpires 1 -- Set user password policy

Network Configuration

ipconfig /all -- Show IP config


ipconfig /flushdns -- Flush DNS cache
ipconfig /registerdns -- Re-register DNS
netsh interface ip show config -- NIC config
ping [hostname/IP] -- Check connectivity
tracert [IP/domain] -- Trace route
nslookup [domain] -- DNS resolve
netstat -an -- Show all network connections
Get-NetIPAddress -- PowerShell: IPs
Get-NetAdapter -- List all network adapters
Restart-NetAdapter -Name "Ethernet" -- Restart NIC

Service Control
Top 200+ Windows Server CMD & PowerShell Commands

services.msc -- GUI service manager


net start -- List running services
net start "ServiceName" -- Start a service
net stop "ServiceName" -- Stop a service
sc query -- List service status
Get-Service -- PowerShell: all services
Start-Service -Name "wuauserv" -- Start update service
Stop-Service -Name "Spooler" -- Stop printer service
Restart-Service -Name "Service" -- Restart a service
Set-Service -Name Spooler -StartupType Disabled -- Disable service

Disk & File Management

diskmgmt.msc -- Disk Manager GUI


chkdsk C: /f /r -- Disk check & fix
defrag C: -- Defragment drive
format D: /fs:ntfs -- Format a drive
Get-Volume -- List volumes
Get-Partition -- Partition list
robocopy C:\source D:\dest /MIR -- Mirror copy
tree /f -- Show folder structure
dir /s -- List all files in dir
fsutil volume diskfree C: -- Disk free space info

Process & Task Manager

tasklist -- List all tasks


taskkill /F /PID [PID] -- Kill process
taskkill /IM notepad.exe /F -- Kill app by name
Get-Process -- PowerShell: all processes
Stop-Process -Name "notepad" -Force -- Kill notepad
Start-Process notepad -- Start notepad
schtasks /query /fo LIST -- View all scheduled tasks
taskschd.msc -- Open Task Scheduler
pslist -- SysInternals process viewer
pskill [process_name] -- Kill process with SysInternals

Active Directory (AD)

dsa.msc -- Active Directory GUI


dsquery user -name * -- List AD users
dsadd user -- Add AD user
Top 200+ Windows Server CMD & PowerShell Commands

dsrm user DN -- Remove AD user


netdom query FSMO -- Show FSMO roles
repadmin /replsummary -- Replication summary
Get-ADUser -Filter * -- List AD users (PowerShell)
Get-ADComputer -Filter * -- List all AD PCs
Get-ADGroupMember "Domain Admins" -- List group members
Search-ADAccount -LockedOut -- Find locked users

Windows Update

wuapp -- Windows update GUI


sconfig -- Server Core config
usoclient StartScan -- Force update scan
Get-WindowsUpdateLog -- Fetch update log
Install-WindowsUpdate -- Install update via PS
net stop wuauserv -- Stop update service
net start wuauserv -- Start update service
sc config wuauserv start=disabled -- Disable update
wuauclt /detectnow -- Force detect update (older versions)
Get-WUInstall -AcceptAll -- PS: Install all updates

Group Policy & Security

gpedit.msc -- Group Policy Editor


gpupdate /force -- Force policy update
rsop.msc -- Resultant set of policy
secedit /analyze -- Analyze security
secpol.msc -- Local Security Policy
auditpol /get /category:* -- Get audit settings
net accounts /minpwlen:8 -- Set password policy
net accounts /maxpwage:30 -- Password age policy
lockoutstatus.exe -- Check account lock status
Get-GPO -All -- List all GPOs (PowerShell)

Firewall & Remote

wf.msc -- Firewall GUI


netsh advfirewall set allprofiles state off -- Disable firewall
netsh advfirewall firewall add rule name=AllowTCP protocol=TCP dir=in localport=80
action=allow -- Allow port
Get-NetFirewallProfile -- Show FW profiles
Set-NetFirewallProfile -All Enabled False -- Disable FW via PS
Top 200+ Windows Server CMD & PowerShell Commands

mstsc -- Remote desktop


shutdown /s /t 0 -- Shutdown now
shutdown /r /t 0 -- Restart now
shutdown /l -- Logout
Restart-Computer -- PS: Restart

Monitoring & Logs

eventvwr -- Event Viewer GUI


Get-EventLog -LogName System -Newest 10 -- View system logs
wevtutil qe System /c:10 /f:text -- Quick event logs
perfmon -- Performance monitor
resmon -- Resource monitor
Get-EventLog -LogName Security -Newest 20 -- Security events
logman query -- List log collectors
type perfmon.log -- View performance log
Get-WinEvent -LogName Application | select -First 5 -- App events
Get-WinEvent -ListLog * -- List all event logs

You might also like