Windows Server Commands & Scripts for IT Support
As an IT Support Specialist, mastering scripts and command-line tools can significantly
enhance efficiency and automation. This guide provides key commands and scripts for Windows
and Linux systems, helping IT professionals streamline tasks and improve troubleshooting.
1. Basic Commands
• hostname – Show computer name
• whoami – Show current user
• systeminfo – Show system details
• ipconfig /all – Show network configuration
• netstat -ano – View active connections
2. User & Group Management
• Create a user:
net user JohnDoe Password123 /add
• Delete a user:
net user JohnDoe /delete
• Add user to group:
net localgroup Administrators JohnDoe /add
• List all users:
Get-LocalUser
• List all groups:
net localgroup
3. File & Directory Management
• Create a directory:
mkdir C:\SharedFolder
• Copy files:
copy C:\source\file.txt D:\destination\
• Delete a file:
del C:\path\to\file.txt
• List all files:
dir C:\path
4. Network Commands
• Check IP configuration:
ipconfig /all
• Flush DNS:
ipconfig /flushdns
• Test network connection:
ping google.com
• Check open ports:
netstat -an
• Trace route:
tracert google.com
5. Process Management
• List all processes:
tasklist
• Kill a process:
taskkill /IM notepad.exe /F
• Monitor system performance:
perfmon
6. Disk & Storage Management
• Check disk usage:
Get-PSDrive
• Format a drive:
format D: /FS:NTFS /Q
• Check disk health:
chkdsk C: /F /R
7. Service Management
• List all services:
Get-Service
• Start a service:
Start-Service -Name "wuauserv"
• Stop a service:
Stop-Service -Name "wuauserv"
• Restart a service:
Restart-Service -Name "wuauserv"
8. Task Scheduling (Automation)
• List all scheduled tasks:
schtasks /query /fo LIST
• Create a scheduled task:
schtasks /create /tn "Backup" /tr "C:\Scripts\backup.bat" /sc daily /st 02:00
• Delete a scheduled task:
schtasks /delete /tn "Backup"
9. Windows Firewall & Security
• Check firewall status:
netsh advfirewall show allprofiles
• Allow an application through the firewall:
netsh advfirewall firewall add rule name="Allow RDP" protocol=TCP dir=in
localport=3389 action=allow
• Disable firewall:
netsh advfirewall set allprofiles state off
10. Software Deployment (GPO & PowerShell)
• Install software via PowerShell:
Start-Process msiexec.exe -ArgumentList "/i C:\Software\app.msi /qn" -Wait
• Uninstall software:
Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name='AppName'" |
ForEach-Object { $_.Uninstall() }
11. Remote Desktop & Remote Management
• Enable Remote Desktop:
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -
Name 'fDenyTSConnections' -Value 0
• Restart a remote computer:
shutdown /r /m \\RemotePC /t 0
12. Active Directory Management
• List all domain users:
Get-ADUser -Filter *
• Create a new AD user:
New-ADUser -Name "John Doe" -SamAccountName jdoe -UserPrincipalName
jdoe@domain.com -Path "OU=Users,DC=domain,DC=com"
• Reset AD user password:
Set-ADAccountPassword -Identity jdoe -Reset -NewPassword (ConvertTo-
SecureString "NewPass123!" -AsPlainText -Force)
This document provides essential commands and scripts for IT Support Specialists working with
Windows Server.