Basic Operations
mkdir Projects :: Create a folder named Projects
rmdir Projects :: Remove an empty folder
rmdir /s Projects :: Remove a folder and everything inside it
rmdir /s /q Projects :: Remove it without asking for confirmation
move report.txt C:\Reports :: Move report.txt to C:\Reports
copy report.txt C:\Reports :: Copy report.txt to C:\Reports
del report.txt :: Delete report.txt
erase report.txt :: Delete report.txt
type report.txt :: Display the contents of report.txt
System Information
ver :: Show the Windows version
systeminfo :: Show detailed system information
driverquery :: List installed device drivers
chkdsk :: Check a disk for file system errors
sfc /scannow :: Check and repair protected system files
Ipconfig
- It is a Windows command used to display your computer’s network information.
- It can show details such as your IP address, subnet mask, and default gateway.
ipconfig :: Show basic network information
ipconfig /all :: Show detailed network information
ipconfig /release :: Release the current DHCP IP address
ipconfig /renew :: Request a new DHCP IP address
ipconfig /flushdns :: Clear the DNS cache
Present Working Directory
cd
Map IP addresses to MAC address
(Address Resolution Protocol)
arp -a
Tasklist
- It displays the processes currently running on Windows.
- It shows details such as the process name, process ID (PID), and memory usage.
tasklist :: List running processes
tasklist /svc :: Show services associated with processes
tasklist /FI "IMAGENAME eq notepad.exe" :: Find Notepad processes
taskkill /PID 1234 :: Stop the process with PID 1234
taskkill /IM notepad.exe :: Stop Notepad processes by name
taskkill /F /PID 1234 :: Force the process to stop
Display all files and folders
dir :: List files and folders in the current directory
dir C:\Users :: List files and folders in C:\Users
dir /a :: Include hidden and system files
dir /s :: Include files in subdirectories
dir /? :: Show all available options
Netstat
- It displays information about your computer’s network connections.
- It can show open connections, listening ports, and the processes using them.
netstat -a :: Show connections and listening ports
netstat -n :: Show addresses and ports as numbers
netstat -b :: Show programs associated with connections
netstat -ano :: Show connections, listening ports, and process IDs
Display active processes using PID
tasklist /FI "PID eq <no>"
Terminate particular process by PID
taskkill /PID <no> /F
Ping
- It checks whether a device can be reached over a network and shows how long a response takes.
- It uses ICMP (Internet Control Message Protocol): it sends an Echo Request, and the target may reply with an Echo Reply.
ping <ip-address> # Continuously ping a device on Linux
ping -c 4 <ip-address> # Send 4 ping requests on Linux
ping <hostname> # Ping a device using its hostname
Traceroute
- It shows the path network traffic takes from your computer to a destination.
- It displays the hops—usually routers—along the way and the time taken to reach them.
tracert <hostname or IP address>
Nslookup
- It is used to look up DNS information for a domain or IP address.
- For example, it can find the IP address associated with a website name.
nslookup example.com # Look up IP addresses for a domain
nslookup <ip-address> # Look up the hostname associated with an IP
nslookup example.com <specific-dns-server>
nslookup -type=MX example.com # Look up mail servers for a domain
Hostname
- It is a command used to display or set the name of a computer.
hostname # Show the computer's hostname
hostname -I # Show the computer's IP addresses
hostname -f # Show the fully qualified domain name, if configured
Check drive
Checks the file system and file system metadata of a volume for logical and physical errors.
chkdsk <drive>:
Scan all files
Scans all protected system files and replaces corrupted files with a cached copy.
sfc /scannow
Disk partitioning
diskpart
Change Directory
cd <directory_path>
Change current drive.
<drive_letter>:
Boot Configuration
Views or makes changes to the Boot Configuration Data (BCD) store.
bcdedit
Set an environment variable temporarily
Displays, sets, or removes environment variables in the current command prompt session.
set
set <variable>=<value>
set <variable>=
Set an environment variable permanently
setx <variable> <value>
Open a website
Opens a website link in the default web browser.
start <website_link>
Display/Set the system date.
date
Display/Set the system time.
time
Cancel the process
Display Message
echo "message"
Create new directory
mkdir <directory_name>
Delete a folder
rmdir <directory_name>
Deletes one or more files.
del <file_path>
Move a file
move <source> <destination>
Rename a file
rename <old_name> <new_name>
Clear
Clears the command prompt screen.
cls
Exit Commannd prompt
Exits the command prompt or a batch script.
exit
Local Users and Groups (lusrmgr.msc)
- It is a Windows tool for managing accounts and permissions on one computer.
- A user is an account someone uses to sign in, such as John or Guest.
- A group is a collection of users with similar permissions. For example, members of the Administrators group can manage many settings on the computer.
- You can open the tool by pressing Windows + R, typing lusrmgr.msc, and pressing Enter.
System Configuration (msconfig)
- It is a Windows tool used to manage certain startup and troubleshooting settings.
- You can use it to choose how Windows starts and to enable or disable services.
System Information (msinfo32)
- It is a Windows tool that displays details about your computer’s hardware, software, and system settings.
- You can use it to check things such as the Windows version, processor, memory, and system model.
Resource Monitor (resmon)
- It is a Windows tool that shows how your computer’s resources are being used in real time.
- It helps you see which processes are using the CPU, memory, disk, and network.
Control Panel (control.msc)
- It is a Windows tool used to view and change computer settings.
- You can use it to manage user accounts, network settings, hardware, programs, and security.
Computer Management (compmgmt.msc)
- It is a Windows tool that brings several system management tools together in one place.
- You can use it to manage user accounts, services, disks, and shared folders, and view system events.
Task Scheduler (taskschd.msc)
- It is a Windows tool used to run programs or tasks automatically.
- You can schedule a task for a specific time or when an event happens, such as when the computer starts or a user signs in.
Shared Folders (fsmgmt.msc)
- It is a Windows tool used to view and manage folders that are shared over a network.
- It shows the shared folders, the users connected to them, and the files they have opened.
User Account Control Settings (UserAccountControlSettings)
- It let you choose when Windows asks for confirmation before allowing changes that need administrator permission.
- For example, Windows may ask for approval when an app tries to install software or change system settings. A standard user may need to enter an administrator’s password.
Windows Update
- It is a Windows feature that downloads and installs updates for your computer.
- Updates can include security fixes, bug fixes, and improvements.
Windows Security
- It is an app that helps protect your computer from threats.
- It lets you check antivirus protection, firewall settings, device security, and other security features. For example, you can use Virus & threat protection to scan your computer for harmful software.
Firewall & Network Protection
A firewall helps control which network connections are allowed into and out of your computer. Windows uses different profiles depending on the network you’re connected to:
- Domain: Used on an organization’s network when your computer can connect to its domain controller. For example, a company network.
- Private: Used for a trusted network that you choose to mark as private. For example, your home network.
- Public: Used for networks you don’t fully trust. For example, Wi-Fi at a coffee shop or airport.
BitLocker
- It is a Windows feature that encrypts the data on a drive.
- Encryption makes the data unreadable without the appropriate key. This helps protect your files if your computer or drive is lost or stolen.
- For example, if someone removes the drive from a lost laptop and connects it to another computer, BitLocker helps prevent them from reading its files.
- A TPM (Trusted Protection Module) is a security chip that can help BitLocker protect the encryption key and check that the computer’s startup components haven’t been tampered with.
- It provides a recovery key for situations where the drive can’t be unlocked normally. Keep that key somewhere safe
Volume Shadow Copy Service (VSS)
- It is a Windows service that helps create a snapshot of data at a particular point in time.
- A snapshot can help Windows or backup software recover an earlier version of data.
With System Protection enabled, you can:
- Create a restore point: Save a snapshot of certain system settings and files.
- Perform a system restore: Use a restore point to return Windows system files and settings to an earlier state.
- Configure restore settings: Choose how much space is used for restore points.
- Delete restore points: Remove saved restore points. For example, if a driver update causes a problem, you may be able to use a restore point from before the update.
Windows Registry (regedit.exe)
- It is a database that stores settings for Windows and many applications. It contains information such as:
- User account preferences
- Settings for installed applications
- Hardware and device settings
- Settings that Windows uses when it starts
Active Directory
- It is a Microsoft system that helps organizations manage users, computers, and permissions from a central place.
- For example, in a company with hundreds of employees, an administrator can use Active Directory to create accounts, control who can access shared files, and apply settings to computers.
Active Directory Domain
- A domain is a group of users, computers, and other resources managed together using Active Directory.
- For example, a company might have a domain called company.local. Employees can use their domain accounts to sign in to authorized company computers.
Main Components
- Users: Accounts belonging to employees or services.
- Computers: Devices that belong to the domain.
- Groups: Collections of users or computers used to manage permissions.
- Domain Controller (DC): A server that stores directory information and checks sign-in credentials.
- Group Policy: Settings that administrators can apply to users and computers.
Active Directory Domain Services (AD DS)
- It is the service that keeps a central directory of the things in a Windows domain. Each entry is called an object. Examples include users, computers, groups, and printers.
Organizational Units (OUs)
- It is a container used to organize objects in Active Directory. For example, THM Inc. might have separate OUs for IT, Sales, and Marketing.
- Administrators can apply policies to an OU—for example, different desktop settings for the Sales and IT departments.
- A user object is located in one OU at a time, though it can still be affected by policies linked at multiple levels.

Builtin: Contains default groups available to any Windows host.
Computers: Any machine joining the network will be put here by default.
Domain Controllers: Default OU that contains the DCs in your network.
Users: Default users and groups that apply to a domain-wide context.
Managed Service Accounts: Holds accounts used by services in your Windows domain.
Security Groups
- It makes it easier to give the same permissions to multiple users or computers.
- For example, instead of giving every sales employee access to a shared folder separately, you can:
- Create a Sales security group.
- Give the group access to the folder.
- Add sales employees to the group.











Top comments (0)